From d71bbd4a9f957f1b9ffdcaee00bc6f030b8ebc27 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 6 Nov 2013 10:14:23 +0100 Subject: [PATCH] Fix use-after-free --- prototype.c | 4 ++-- 1 file 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; } -- 2.7.4