From: Daniel P. Berrange Date: Wed, 25 Sep 2013 14:29:45 +0000 (+0100) Subject: Avoid double free in qemuMonitorCommonTestInit on OOM X-Git-Tag: v1.1.3-rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9129f9b3f1c347889e78f8c671d625c11b9eb864;p=thirdparty%2Flibvirt.git 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 --- diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 763102ce44..956847667c 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -849,7 +849,6 @@ qemuMonitorCommonTestInit(qemuMonitorTestPtr test) return 0; error: - qemuMonitorTestFree(test); return -1; }