From fbba7c404875d3e2e9f4a6d08ccc53014c091c37 Mon Sep 17 00:00:00 2001
Message-Id: <fbba7c404875d3e2e9f4a6d08ccc53014c091c37@dist-git>
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Date: Tue, 18 Feb 2014 15:45:28 -0700
Subject: [PATCH] LXC: free dst before lxcDomainAttachDeviceDiskLive returns
https://bugzilla.redhat.com/show_bug.cgi?id=1045643
prereq of CVE-2013-6456
Free dst before lxcDomainAttachDeviceDiskLive returns
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
(cherry picked from commit c82513acc2e1e0b035e5e53577a34fd68a530788)
Signed-off-by: Jiri Denemark <jdenemar@redhat.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 cf7b62c..a6efaa4 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -3177,6 +3177,7 @@ cleanup:
virDomainAuditDisk(vm, NULL, def->src, "attach", ret == 0);
if (dst && created && ret < 0)
unlink(dst);
+ VIR_FREE(dst);
return ret;
}
--
1.9.0