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:
Daniel P. Berrange 2013-09-25 15:29:45 +01:00
parent 92f8c3fc71
commit 9129f9b3f1

View File

@ -849,7 +849,6 @@ qemuMonitorCommonTestInit(qemuMonitorTestPtr test)
return 0;
error:
qemuMonitorTestFree(test);
return -1;
}