testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo: Use automatic memory management

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-07-05 16:29:49 +02:00
parent 531a1fa84f
commit efb30a055c

View File

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