mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemuMonitorGetChardevInfo: virHashNew
cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
c30410a0c4
commit
772a9875f7
@ -2884,15 +2884,12 @@ int
|
|||||||
qemuMonitorGetChardevInfo(qemuMonitor *mon,
|
qemuMonitorGetChardevInfo(qemuMonitor *mon,
|
||||||
GHashTable **retinfo)
|
GHashTable **retinfo)
|
||||||
{
|
{
|
||||||
g_autoptr(GHashTable) info = NULL;
|
g_autoptr(GHashTable) info = virHashNew(qemuMonitorChardevInfoFree);
|
||||||
|
|
||||||
VIR_DEBUG("retinfo=%p", retinfo);
|
VIR_DEBUG("retinfo=%p", retinfo);
|
||||||
|
|
||||||
QEMU_CHECK_MONITOR(mon);
|
QEMU_CHECK_MONITOR(mon);
|
||||||
|
|
||||||
if (!(info = virHashNew(qemuMonitorChardevInfoFree)))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (qemuMonitorJSONGetChardevInfo(mon, info) < 0)
|
if (qemuMonitorJSONGetChardevInfo(mon, info) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user