[PATCH 08/23] qemuDomainGetDiskErrors: Automatically free GHashTable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5330a1d3b7..4fcd6190d1 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16439,7 +16439,7 @@ qemuDomainGetDiskErrors(virDomainPtr dom,
     virQEMUDriver *driver = dom->conn->privateData;
     virDomainObj *vm = NULL;
     qemuDomainObjPrivate *priv;
-    GHashTable *table = NULL;
+    g_autoptr(GHashTable) table = NULL;
     bool blockdev = false;
     int ret = -1;
     size_t i;
@@ -16501,7 +16501,6 @@ qemuDomainGetDiskErrors(virDomainPtr dom,

  cleanup:
     virDomainObjEndAPI(&vm);
-    virHashFree(table);
     if (ret < 0) {
         for (i = 0; i < n; i++)
             VIR_FREE(errors[i].disk);
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux