LXC: free dst before lxcDomainAttachDeviceDiskLive returns

Free dst before lxcDomainAttachDeviceDiskLive returns

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
(cherry picked from commit c82513acc2e1e0b035e5e53577a34fd68a530788)
This commit is contained in:
Chen Hanxiao 2013-09-26 14:01:52 +08:00 committed by Daniel P. Berrange
parent d5557a3a58
commit 2eec7e0357

View 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;
}