[libvirt] [PATCH]LXC: free dst before lxcDomainAttachDeviceDiskLive return

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Thu Sep 26 06:01:52 UTC 2013


From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>

free dst before lxcDomainAttachDeviceDiskLive return

Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 src/lxc/lxc_driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 9c58f67..7906ad1 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -3053,6 +3053,7 @@ cleanup:
     virDomainAuditDisk(vm, NULL, def->src, "attach", ret == 0);
     if (dst && created && ret < 0)
         unlink(dst);
+    VIR_FREE(dst);
     return ret;
 }
 
-- 
1.8.2.1




More information about the libvir-list mailing list