]> xenbits.xensource.com Git - libvirt.git/commitdiff
security: Need to initialize 'sens'
authorJohn Ferlan <jferlan@redhat.com>
Tue, 22 Jan 2013 14:15:48 +0000 (09:15 -0500)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 22 Jan 2013 16:29:26 +0000 (17:29 +0100)
It was possible to call VIR_FREE in cleanup prior to initialization

src/security/security_selinux.c

index 511e92342c816d6e280a4bda657950bad9e98617..a3ef728cd97ecb8a033fff4cfb1421686cb50d7e 100644 (file)
@@ -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) {