From: Tim Wiederhake Date: Tue, 6 Jul 2021 12:37:56 +0000 (+0200) Subject: qemuMonitorGetBlockInfo: `virHashNew` cannot return NULL X-Git-Tag: v7.6.0-rc1~213 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=317938165cc8184979cab53991d1a6b8cb324010;p=thirdparty%2Flibvirt.git qemuMonitorGetBlockInfo: `virHashNew` cannot return NULL Signed-off-by: Tim Wiederhake Reviewed-by: Michal Privoznik --- diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 2253c96cb5..f2c35ab173 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2103,13 +2103,10 @@ qemuDomainDiskInfoFree(void *value) GHashTable * qemuMonitorGetBlockInfo(qemuMonitor *mon) { - g_autoptr(GHashTable) table = NULL; + g_autoptr(GHashTable) table = virHashNew(qemuDomainDiskInfoFree); QEMU_CHECK_MONITOR_NULL(mon); - if (!(table = virHashNew(qemuDomainDiskInfoFree))) - return NULL; - if (qemuMonitorJSONGetBlockInfo(mon, table) < 0) { return NULL; }