mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
Avoid double free in qemuMonitorCommonTestInit on OOM
The qemuMonitorCommonTestInit method did not allocate the test object, so it should not free it upon failure. Doing so causes a double free with the caller. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
92f8c3fc71
commit
9129f9b3f1
@ -849,7 +849,6 @@ qemuMonitorCommonTestInit(qemuMonitorTestPtr test)
|
||||
return 0;
|
||||
|
||||
error:
|
||||
qemuMonitorTestFree(test);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user