mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
lib: Don't access configuration if none is present
Commit e457d5ef20
adds ability to pass the
default URI using the client configuration file. If the file is not
present, it still accesses the NULL config object causing a segfault.
Caught running "make check".
This commit is contained in:
parent
362c3b33e6
commit
59d0c9801c
@ -1085,7 +1085,8 @@ virConnectOpenResolveURIAlias(virConfPtr conf,
|
||||
|
||||
*uri = NULL;
|
||||
|
||||
if ((value = virConfGetValue(conf, "uri_aliases")))
|
||||
if (conf &&
|
||||
(value = virConfGetValue(conf, "uri_aliases")))
|
||||
ret = virConnectOpenFindURIAliasMatch(value, alias, uri);
|
||||
else
|
||||
ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user