]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu_domain: Don't leak @paths in qemuDomainNamespaceSetupDisk
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 16 Apr 2018 15:34:48 +0000 (17:34 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 16 Apr 2018 15:34:51 +0000 (17:34 +0200)
Introduced in d3db304d2e4. Instead of returning immediately we
need to jump onto cleanup label where @paths is freed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domain.c

index 7000de6a912e24d4c717a7a1945ce57e2cb7f59e..6e18886d072934f2bb1cf7724a704f262c0a4e54 100644 (file)
@@ -11199,7 +11199,7 @@ qemuDomainNamespaceSetupDisk(virDomainObjPtr vm,
     }
 
     if (qemuDomainNamespaceMknodPaths(vm, paths, npaths) < 0)
-        return -1;
+        goto cleanup;
 
     ret = 0;
  cleanup: