mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
Fix leak of parser state in virJSONValueFromString
If OOM or another error occurs in virJSONValueFromString the parser state object will be leaked. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
d3f8fec456
commit
ec48aaee23
@ -1014,6 +1014,7 @@ cleanup:
|
||||
for (i = 0; i < parser.nstate; i++) {
|
||||
VIR_FREE(parser.state[i].key);
|
||||
}
|
||||
VIR_FREE(parser.state);
|
||||
}
|
||||
|
||||
VIR_DEBUG("result=%p", parser.head);
|
||||
|
Loading…
Reference in New Issue
Block a user