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.
This commit is contained in:
Osier Yang 2012-08-28 19:31:56 +08:00
parent 500c246889
commit a22909d5c2
1 changed files with 1 additions and 1 deletions

View File

@ -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;