mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
apparmor: Drop needless check in AppArmorSetMemoryLabel()
The AppArmorSetMemoryLabel() is a callback that is called from qemuSecuritySetMemoryLabel() which never passes NULL as @mem. Therefore, there is no need to check whether @mem is NULL. Also, no other driver does that and just dereference it immediately. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
d4eb2aabca
commit
a1310c9644
@ -681,9 +681,6 @@ AppArmorSetMemoryLabel(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr def,
|
||||
virDomainMemoryDefPtr mem)
|
||||
{
|
||||
if (mem == NULL)
|
||||
return 0;
|
||||
|
||||
switch (mem->model) {
|
||||
case VIR_DOMAIN_MEMORY_MODEL_NVDIMM:
|
||||
if (!virFileExists(mem->nvdimmPath)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user