qemuMonitorGetMemoryDeviceInfo: 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:02:40 +02:00
parent 927c9969b9
commit 0ed26fca81

View File

@ -4214,7 +4214,7 @@ int
qemuMonitorGetMemoryDeviceInfo(qemuMonitor *mon,
GHashTable **info)
{
GHashTable *hash;
g_autoptr(GHashTable) hash = NULL;
int ret;
VIR_DEBUG("info=%p", info);
@ -4229,7 +4229,6 @@ qemuMonitorGetMemoryDeviceInfo(qemuMonitor *mon,
if ((ret = qemuMonitorJSONGetMemoryDeviceInfo(mon, hash)) >= 0)
*info = g_steal_pointer(&hash);
virHashFree(hash);
return ret;
}