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:
Tim Wiederhake 2021-07-06 14:37:59 +02:00 committed by Michal Privoznik
parent c30410a0c4
commit 772a9875f7

View File

@ -2884,15 +2884,12 @@ int
qemuMonitorGetChardevInfo(qemuMonitor *mon,
GHashTable **retinfo)
{
g_autoptr(GHashTable) info = NULL;
g_autoptr(GHashTable) info = virHashNew(qemuMonitorChardevInfoFree);
VIR_DEBUG("retinfo=%p", retinfo);
QEMU_CHECK_MONITOR(mon);
if (!(info = virHashNew(qemuMonitorChardevInfoFree)))
return -1;
if (qemuMonitorJSONGetChardevInfo(mon, info) < 0)
return -1;