mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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,
|
char ***configs,
|
||||||
bool privileged)
|
bool privileged)
|
||||||
{
|
{
|
||||||
g_autoptr(GHashTable) files = NULL;
|
g_autoptr(GHashTable) files = virHashNew(g_free);
|
||||||
g_autofree char *homeConfig = NULL;
|
g_autofree char *homeConfig = NULL;
|
||||||
g_autofree char *xdgConfig = NULL;
|
g_autofree char *xdgConfig = NULL;
|
||||||
g_autofree char *sysLocation = virFileBuildPath(QEMU_SYSTEM_LOCATION, name, 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);
|
homeConfig = g_strdup_printf("%s/qemu/%s", xdgConfig, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(files = virHashNew(g_free)))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (qemuBuildFileList(files, sysLocation) < 0)
|
if (qemuBuildFileList(files, sysLocation) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user