mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 22:03:49 +03:00
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:
parent
927c9969b9
commit
0ed26fca81
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user