[PATCH 12/23] qemuProcessWaitForMonitor: Automatically free GHashTable

Peter Krempa pkrempa at redhat.com
Tue Nov 30 14:31:56 UTC 2021


Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 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 2fdd5b95e2..d1b34612ee 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2392,7 +2392,7 @@ qemuProcessWaitForMonitor(virQEMUDriver *driver,
                           qemuDomainLogContext *logCtxt)
 {
     int ret = -1;
-    GHashTable *info = NULL;
+    g_autoptr(GHashTable) info = NULL;
     qemuDomainObjPrivate *priv = vm->privateData;
     bool retry = true;

@@ -2425,8 +2425,6 @@ qemuProcessWaitForMonitor(virQEMUDriver *driver,
     }

  cleanup:
-    virHashFree(info);
-
     if (logCtxt && kill(vm->pid, 0) == -1 && errno == ESRCH) {
         qemuProcessReportLogError(logCtxt,
                                   _("process exited while connecting to monitor"));
-- 
2.31.1




More information about the libvir-list mailing list