From: Tim Wiederhake Date: Mon, 5 Jul 2021 13:56:00 +0000 (+0200) Subject: qemuInteropFetchConfigs: `virHashNew` cannot return NULL X-Git-Tag: v7.6.0-rc1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d79a5e4e1bf063126be95e2a2d76bbc0cad94033;p=thirdparty%2Flibvirt.git qemuInteropFetchConfigs: `virHashNew` cannot return NULL Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- diff --git a/src/qemu/qemu_interop_config.c b/src/qemu/qemu_interop_config.c index ea2afcc070..848e8f7381 100644 --- a/src/qemu/qemu_interop_config.c +++ b/src/qemu/qemu_interop_config.c @@ -88,7 +88,7 @@ qemuInteropFetchConfigs(const char *name, char ***configs, bool privileged) { - g_autoptr(GHashTable) files = NULL; + g_autoptr(GHashTable) files = virHashNew(g_free); g_autofree char *homeConfig = NULL; g_autofree char *xdgConfig = NULL; g_autofree char *sysLocation = virFileBuildPath(QEMU_SYSTEM_LOCATION, name, NULL); @@ -117,9 +117,6 @@ qemuInteropFetchConfigs(const char *name, homeConfig = g_strdup_printf("%s/qemu/%s", xdgConfig, name); } - if (!(files = virHashNew(g_free))) - return -1; - if (qemuBuildFileList(files, sysLocation) < 0) return -1;