[libvirt PATCH 35/38] virSecuritySELinuxLXCInitialize: `virHashNew` cannot return NULL

Tim Wiederhake twiederh at redhat.com
Thu Jul 22 07:50:27 UTC 2021


Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
 src/security/security_selinux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 0c2cf1d1c7..0bff9b7bae 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -687,8 +687,7 @@ virSecuritySELinuxLXCInitialize(virSecurityManager *mgr)
         goto error;
     }
 
-    if (!(data->mcs = virHashNew(NULL)))
-        goto error;
+    data->mcs = virHashNew(NULL);
 
     return 0;
 
-- 
2.31.1




More information about the libvir-list mailing list