提交 59d0c980 编写于 作者: P Peter Krempa

lib: Don't access configuration if none is present

Commit e457d5ef 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".
上级 362c3b33
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册