aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2012-08-28 19:31:56 +0800
committerOsier Yang <jyang@redhat.com>2012-08-28 23:54:17 +0800
commita22909d5c2fd9ec6d55c4f57c64f111014d3cfa8 (patch)
tree732c0e997e355ef4b43fa52e010f5b2e8741c84c /src/conf/domain_conf.c
parentbuild: define 'inline' iff HAVE_LIBNL1 (diff)
downloadlibvirt-a22909d5c2fd9ec6d55c4f57c64f111014d3cfa8.tar.gz
libvirt-a22909d5c2fd9ec6d55c4f57c64f111014d3cfa8.tar.bz2
libvirt-a22909d5c2fd9ec6d55c4f57c64f111014d3cfa8.zip
conf: Fix the problem which cause libvirtd to crash
* src/conf/domain_conf.c: Use STREQ_NULLABLE instead of STREQ, as def->seclables[i]->model could be NULL.
Diffstat (limited to 'src/conf/domain_conf.c')
-rw-r--r--src/conf/domain_conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c02d6f850..224aec51d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -14995,7 +14995,7 @@ virDomainDiskDefGetSecurityLabelDef(virDomainDiskDefPtr def, const char *model)
return NULL;
for (i = 0; i < def->nseclabels; i++) {
- if (STREQ(def->seclabels[i]->model, model))
+ if (STREQ_NULLABLE(def->seclabels[i]->model, model))
return def->seclabels[i];
}
return NULL;