mirror of https://gitee.com/openkylin/libvirt.git
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