[libvirt PATCH 15/38] qemuInteropFetchConfigs: `virHashNew` cannot return NULL
Tim Wiederhake
twiederh at redhat.com
Thu Jul 22 07:50:07 UTC 2021
Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
src/qemu/qemu_interop_config.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
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;
--
2.31.1
More information about the libvir-list
mailing list