mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-14 12:58:33 +03:00
selinux: fix NULL dereference in GetSecurityMountOptions
In the case of an OOM error in virDomainDefGetSecurityLabelDef, secdef is set to NULL, then dereferenced while printing the debug message.
This commit is contained in:
parent
912a4e9c06
commit
b28fb61fd7
@ -1993,7 +1993,8 @@ virSecuritySELinuxGetSecurityMountOptions(virSecurityManagerPtr mgr,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
VIR_DEBUG("imageLabel=%s opts=%s", secdef->imagelabel, opts);
|
||||
VIR_DEBUG("imageLabel=%s opts=%s",
|
||||
secdef ? secdef->imagelabel : "(null)", opts);
|
||||
return opts;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user