From: Tim Wiederhake Date: Mon, 5 Jul 2021 14:05:52 +0000 (+0200) Subject: qemuMonitorGetPRManagerInfo: Use automatic memory management X-Git-Tag: v7.6.0-rc1~151 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cdcbdd25e100ca34e40656016245fddaf6c98c77;p=thirdparty%2Flibvirt.git qemuMonitorGetPRManagerInfo: Use automatic memory management Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 940eeab9a8..36b1f15c7d 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -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; }