mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemuMonitorGetMemoryDeviceInfo: virHashNew
cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
0ed26fca81
commit
00f4820951
@ -4214,7 +4214,7 @@ int
|
||||
qemuMonitorGetMemoryDeviceInfo(qemuMonitor *mon,
|
||||
GHashTable **info)
|
||||
{
|
||||
g_autoptr(GHashTable) hash = NULL;
|
||||
g_autoptr(GHashTable) hash = virHashNew(g_free);
|
||||
int ret;
|
||||
|
||||
VIR_DEBUG("info=%p", info);
|
||||
@ -4223,9 +4223,6 @@ qemuMonitorGetMemoryDeviceInfo(qemuMonitor *mon,
|
||||
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
if (!(hash = virHashNew(g_free)))
|
||||
return -1;
|
||||
|
||||
if ((ret = qemuMonitorJSONGetMemoryDeviceInfo(mon, hash)) >= 0)
|
||||
*info = g_steal_pointer(&hash);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user