]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo: Use automatic memory management
authorTim Wiederhake <twiederh@redhat.com>
Mon, 5 Jul 2021 14:29:49 +0000 (16:29 +0200)
committerTim Wiederhake <twiederh@redhat.com>
Wed, 14 Jul 2021 13:37:07 +0000 (15:37 +0200)
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tests/qemumonitorjsontest.c

index e6746b806fc509413f30aa6a84942d8739696414..e993c30c976489508f57bee15cae8e5218654c76 100644 (file)
@@ -1536,7 +1536,7 @@ testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo(const void *opaque)
 {
     const testGenericData *data = opaque;
     virDomainXMLOption *xmlopt = data->xmlopt;
-    GHashTable *blockstats = NULL;
+    g_autoptr(GHashTable) blockstats = NULL;
     qemuBlockStats *stats;
     int ret = -1;
     g_autoptr(qemuMonitorTest) test = NULL;
@@ -1688,7 +1688,6 @@ testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo(const void *opaque)
 #undef CHECK0FULL
 
  cleanup:
-    virHashFree(blockstats);
     return ret;
 }