mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemuMonitorGetPRManagerInfo: 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
df27180d49
commit
cdcbdd25e1
@ -4516,21 +4516,18 @@ qemuMonitorGetPRManagerInfo(qemuMonitor *mon,
|
||||
GHashTable **retinfo)
|
||||
{
|
||||
int ret = -1;
|
||||
GHashTable *info = NULL;
|
||||
g_autoptr(GHashTable) info = virHashNew(g_free);
|
||||
|
||||
*retinfo = NULL;
|
||||
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
info = virHashNew(g_free);
|
||||
|
||||
if (qemuMonitorJSONGetPRManagerInfo(mon, info) < 0)
|
||||
goto cleanup;
|
||||
|
||||
*retinfo = g_steal_pointer(&info);
|
||||
ret = 0;
|
||||
cleanup:
|
||||
virHashFree(info);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user