[libvirt PATCH 05/10] testQemuMonitorJSONqemuMonitorJSONGetBlockInfo: Use automatic memory management

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

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 tests/qemumonitorjsontest.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 8895c7305f..e4a907e5b6 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -1461,8 +1461,8 @@ testQemuMonitorJSONqemuMonitorJSONGetBlockInfo(const void *opaque)
     const testGenericData *data = opaque;
     virDomainXMLOption *xmlopt = data->xmlopt;
     int ret = -1;
-    GHashTable *blockDevices = NULL;
-    GHashTable *expectedBlockDevices = NULL;
+    g_autoptr(GHashTable) blockDevices = NULL;
+    g_autoptr(GHashTable) expectedBlockDevices = NULL;
     struct qemuDomainDiskInfo *info;
     g_autoptr(qemuMonitorTest) test = NULL;
 
@@ -1526,8 +1526,6 @@ testQemuMonitorJSONqemuMonitorJSONGetBlockInfo(const void *opaque)
 
     ret = 0;
  cleanup:
-    virHashFree(blockDevices);
-    virHashFree(expectedBlockDevices);
     return ret;
 }
 
-- 
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