From: Osier Yang Date: Tue, 28 Aug 2012 11:31:56 +0000 (+0800) Subject: conf: Fix the problem which cause libvirtd to crash X-Git-Tag: v0.10.0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a22909d5c2fd9ec6d55c4f57c64f111014d3cfa8;p=thirdparty%2Flibvirt.git 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. --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c02d6f8502..224aec51dc 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;