LXC: free dst before lxcDomainAttachDeviceDiskLive returns

Free dst before lxcDomainAttachDeviceDiskLive returns

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
Chen Hanxiao 2013-09-26 14:01:52 +08:00 committed by Ján Tomko
parent 21813c9fb5
commit c82513acc2

View File

@ -3023,6 +3023,7 @@ cleanup:
virDomainAuditDisk(vm, NULL, def->src, "attach", ret == 0); virDomainAuditDisk(vm, NULL, def->src, "attach", ret == 0);
if (dst && created && ret < 0) if (dst && created && ret < 0)
unlink(dst); unlink(dst);
VIR_FREE(dst);
return ret; return ret;
} }