From 9129f9b3f1c347889e78f8c671d625c11b9eb864 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 25 Sep 2013 15:29:45 +0100 Subject: [PATCH] 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 --- tests/qemumonitortestutils.c | 1 - 1 file changed, 1 deletion(-) 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; } -- GitLab