]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
LXC: free dst before lxcDomainAttachDeviceDiskLive returns
authorChen Hanxiao <chenhanxiao@cn.fujitsu.com>
Thu, 26 Sep 2013 06:01:52 +0000 (14:01 +0800)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 18 Feb 2014 17:37:48 +0000 (17:37 +0000)
Free dst before lxcDomainAttachDeviceDiskLive returns

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
(cherry picked from commit c82513acc2e1e0b035e5e53577a34fd68a530788)

src/lxc/lxc_driver.c

index 1687329482b5d53a44f747813ce2a9fc8b84a6a7..1f092bcbcf7f46555c198f8b2cb7f3708b73d688 100644 (file)
@@ -3235,6 +3235,7 @@ cleanup:
     virDomainAuditDisk(vm, NULL, def->src, "attach", ret == 0);
     if (dst && created && ret < 0)
         unlink(dst);
+    VIR_FREE(dst);
     return ret;
 }