mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
qemuInteropFetchConfigs: virHashNew
cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
ecb5dd2a9b
commit
d79a5e4e1b
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user