]> xenbits.xensource.com Git - libvirt.git/commitdiff
security: Need to add virCommandFree()
authorJohn Ferlan <jferlan@redhat.com>
Wed, 23 Jan 2013 22:04:45 +0000 (17:04 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Jan 2013 11:37:30 +0000 (12:37 +0100)
src/security/security_apparmor.c

index 7331c91f8a03b17f7191da0d01e0e497c32e7fbe..2b9c337fba1345d79c64df7d8dfd665d6fca4310 100644 (file)
@@ -183,7 +183,7 @@ load_profile(virSecurityManagerPtr mgr,
 
     xml = virDomainDefFormat(def, VIR_DOMAIN_XML_SECURE);
     if (!xml)
-        goto clean;
+        goto cleanup;
 
     if (profile_status_file(profile) >= 0)
         create = false;
@@ -202,8 +202,9 @@ load_profile(virSecurityManagerPtr mgr,
     virCommandSetInputBuffer(cmd, xml);
     rc = virCommandRun(cmd, NULL);
 
-  clean:
+cleanup:
     VIR_FREE(xml);
+    virCommandFree(cmd);
 
     return rc;
 }