mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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 <berrange@redhat.com>
This commit is contained in:
parent
6bf3078657
commit
d3f8fec456
@ -862,7 +862,6 @@ static int virJSONParserHandleStartMap(void *ctx)
|
||||
|
||||
if (VIR_REALLOC_N(parser->state,
|
||||
parser->nstate + 1) < 0) {
|
||||
virJSONValueFree(value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user