From 7ef8e9af6f63c388b0ed4ed25fe28f4bf687bbd0 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 30 Nov 2021 11:49:24 +0100 Subject: [PATCH] qemuProcessWaitForMonitor: Automatically free GHashTable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko Reviewed-by: Martin Kletzander --- src/qemu/qemu_process.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f0471df045..1edec1a5bb 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2395,7 +2395,7 @@ qemuProcessWaitForMonitor(virQEMUDriver *driver, qemuDomainLogContext *logCtxt) { int ret = -1; - GHashTable *info = NULL; + g_autoptr(GHashTable) info = NULL; qemuDomainObjPrivate *priv = vm->privateData; bool retry = true; @@ -2427,8 +2427,6 @@ qemuProcessWaitForMonitor(virQEMUDriver *driver, } cleanup: - virHashFree(info); - if (logCtxt && kill(vm->pid, 0) == -1 && errno == ESRCH) { qemuProcessReportLogError(logCtxt, _("process exited while connecting to monitor"));