mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
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;
|
return NULL;
|
||||||
|
|
||||||
for (i = 0; i < def->nseclabels; i++) {
|
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 def->seclabels[i];
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user