diff options
author | Petr Machata <pmachata@redhat.com> | 2013-11-06 10:14:23 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2013-11-06 12:12:56 +0100 |
commit | d2154eae286064c4114ec924186535961dfaad79 (patch) | |
tree | 6d73f926f35ddc1552a285f5211064b935b156a2 | |
parent | 9e33f5ac1037adeb32e9d693e6555967e9be68a6 (diff) | |
download | ltrace-d2154eae286064c4114ec924186535961dfaad79.tar.gz |
Fix use-after-free
-rw-r--r-- | prototype.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prototype.c b/prototype.c index 7f91897..a892666 100644 --- a/prototype.c +++ b/prototype.c @@ -564,11 +564,11 @@ protolib_cache_maybe_load(struct protolib_cache *cache, || (*retp == NULL && load_config(cache, key, 0, retp) < 0)) { - if (!own_key) - free((void *) key); fprintf(stderr, "Error occurred when attempting to load a prototype " "library for %s.\n", key); + if (!own_key) + free((void *) key); return -1; } |