]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
selinux: remove unused variables in socket labelling
authorGuannan Ren <gren@redhat.com>
Wed, 17 Oct 2012 03:28:28 +0000 (11:28 +0800)
committerCole Robinson <crobinso@redhat.com>
Sat, 27 Oct 2012 18:58:16 +0000 (14:58 -0400)
(cherry picked from commit d37a3a1d6c6508f235965185453602ba310cc66e)

src/security/security_selinux.c

index 29fb2de136fcfd6dc913fe3a15abe059e4f33b63..58ad8fb96bed643586743c085248a567e8f4f6af 100644 (file)
@@ -1626,8 +1626,6 @@ virSecuritySELinuxSetSecurityDaemonSocketLabel(virSecurityManagerPtr mgr,
 {
     /* TODO: verify DOI */
     virSecurityLabelDefPtr secdef;
-    context_t execcon = NULL;
-    context_t proccon = NULL;
     security_context_t scon = NULL;
     char *str = NULL;
     int rc = -1;
@@ -1670,8 +1668,6 @@ done:
 
     if (security_getenforce() != 1)
         rc = 0;
-    if (execcon) context_free(execcon);
-    if (proccon) context_free(proccon);
     freecon(scon);
     VIR_FREE(str);
     return rc;