mirror of https://gitee.com/openkylin/libvirt.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.
This commit is contained in:
parent
500c246889
commit
a22909d5c2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue