提交 91141474 编写于 作者: O Osier Yang

util: Fix memory leak in virJSONParserHandleStartMap

上级 d61820df
......@@ -799,8 +799,10 @@ static int virJSONParserHandleStartMap(void *ctx)
}
if (VIR_REALLOC_N(parser->state,
parser->nstate + 1) < 0)
parser->nstate + 1) < 0) {
virJSONValueFree(value);
return 0;
}
parser->state[parser->nstate].value = value;
parser->state[parser->nstate].key = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册