From 11813f4128bf603de8d261a158ebea2789ddea04 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Sat, 7 Feb 2015 07:36:29 +0200 Subject: [PATCH] Fix a use after free --- src/pack_unpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pack_unpack.c b/src/pack_unpack.c index af381a5..2a956e4 100644 --- a/src/pack_unpack.c +++ b/src/pack_unpack.c @@ -240,10 +240,10 @@ static json_t *pack_object(scanner_t *s, va_list *ap) } if(json_object_set_new_nocheck(object, key, value)) { + set_error(s, "", "Unable to add key \"%s\"", key); if(ours) jsonp_free(key); - set_error(s, "", "Unable to add key \"%s\"", key); goto error; }