From 772a9875f7dfa636498e281691684799971e3422 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Tue, 6 Jul 2021 14:37:59 +0200 Subject: [PATCH] qemuMonitorGetChardevInfo: `virHashNew` cannot return NULL Signed-off-by: Tim Wiederhake Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 769866e585..a2df1a6ec3 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -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;