This patch fixes a NULL pointer check that was causing SegFault on
some specific configurations. It also reverts commit
59d0c9801c1ab
that was checking for this value in one place.
*uri = NULL;
- if (conf &&
- (value = virConfGetValue(conf, "uri_aliases")))
+ if ((value = virConfGetValue(conf, "uri_aliases")))
ret = virConnectOpenFindURIAliasMatch(value, alias, uri);
else
ret = 0;
/**
* conf.c: parser for a subset of the Python encoded Xen configuration files
*
- * Copyright (C) 2006-2011 Red Hat, Inc.
+ * Copyright (C) 2006-2012 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
{
virConfEntryPtr cur;
+ if (conf == NULL)
+ return NULL;
+
cur = conf->entries;
while (cur != NULL) {
if ((cur->name != NULL) &&