From: Tim Wiederhake Date: Mon, 5 Jul 2021 14:29:49 +0000 (+0200) Subject: testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo: Use automatic memory management X-Git-Tag: v7.6.0-rc1~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efb30a055c496110ab51de6e77bfc0ebd31d90ee;p=thirdparty%2Flibvirt.git testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo: Use automatic memory management Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index e6746b806f..e993c30c97 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -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; }