From: Peter Krempa Date: Tue, 30 Nov 2021 10:49:24 +0000 (+0100) Subject: qemuProcessWaitForMonitor: Automatically free GHashTable X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7ef8e9af6f63c388b0ed4ed25fe28f4bf687bbd0;p=libvirt.git qemuProcessWaitForMonitor: Automatically free GHashTable Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko Reviewed-by: Martin Kletzander --- 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"));