Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
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