From d3f8fec456c814ad01eb05f471988e0604e03fed Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 25 Sep 2013 15:16:24 +0100 Subject: [PATCH] Fix double-free in virJSONParserHandleStartMap on OOM If OOM occurs in virJSONParserHandleStartMap it will free a variable that is owned by another object. This leads to a later double-free. Signed-off-by: Daniel P. Berrange --- src/util/virjson.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virjson.c b/src/util/virjson.c index e93def7cfa..8918bc7f0c 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -862,7 +862,6 @@ static int virJSONParserHandleStartMap(void *ctx) if (VIR_REALLOC_N(parser->state, parser->nstate + 1) < 0) { - virJSONValueFree(value); return 0; }