mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user