[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 12/14] security: Need to initialize 'sens'



It was possible to call VIR_FREE in cleanup prior to initialization
---
 src/security/security_selinux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index b5e1a9a..99e3f9e 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -110,7 +110,7 @@ virSecuritySELinuxMCSFind(virSecurityManagerPtr mgr)
     char *mcs = NULL;
     security_context_t ourSecContext = NULL;
     context_t ourContext = NULL;
-    char *sens, *cat, *tmp;
+    char *sens = NULL, *cat, *tmp;
     int catMin, catMax, catRange;
 
     if (getcon_raw(&ourSecContext) < 0) {
-- 
1.7.11.7


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]