Blame SOURCES/libvirt-LXC-Free-variable-vroot-in-lxcDomainDetachDeviceHostdevUSBLive.patch
|
|
c401cc |
From f441bedbd453c57a87ed281eb2dec759899fac75 Mon Sep 17 00:00:00 2001
|
|
|
c401cc |
Message-Id: <f441bedbd453c57a87ed281eb2dec759899fac75@dist-git>
|
|
|
c401cc |
From: Hongwei Bi <hwbi2008@gmail.com>
|
|
|
c401cc |
Date: Tue, 18 Feb 2014 15:45:27 -0700
|
|
|
c401cc |
Subject: [PATCH] LXC: Free variable vroot in
|
|
|
c401cc |
lxcDomainDetachDeviceHostdevUSBLive()
|
|
|
c401cc |
|
|
|
c401cc |
https://bugzilla.redhat.com/show_bug.cgi?id=1045643
|
|
|
c401cc |
prereq of CVE-2013-6456
|
|
|
c401cc |
|
|
|
c401cc |
The variable vroot should be freed in label cleanup.
|
|
|
c401cc |
|
|
|
c401cc |
(cherry picked from commit 46c9bce4c8b0f2222cc50587ac968ced06eb1eff)
|
|
|
c401cc |
|
|
|
c401cc |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c401cc |
---
|
|
|
c401cc |
src/lxc/lxc_driver.c | 3 ++-
|
|
|
c401cc |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
c401cc |
|
|
|
c401cc |
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
|
|
|
c401cc |
index d37962d..cf7b62c 100644
|
|
|
c401cc |
--- a/src/lxc/lxc_driver.c
|
|
|
c401cc |
+++ b/src/lxc/lxc_driver.c
|
|
|
c401cc |
@@ -3878,7 +3878,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver,
|
|
|
c401cc |
virDomainHostdevDefPtr def = NULL;
|
|
|
c401cc |
int idx, ret = -1;
|
|
|
c401cc |
char *dst = NULL;
|
|
|
c401cc |
- char *vroot;
|
|
|
c401cc |
+ char *vroot = NULL;
|
|
|
c401cc |
virUSBDevicePtr usb = NULL;
|
|
|
c401cc |
|
|
|
c401cc |
if ((idx = virDomainHostdevFind(vm->def,
|
|
|
c401cc |
@@ -3936,6 +3936,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver,
|
|
|
c401cc |
cleanup:
|
|
|
c401cc |
virUSBDeviceFree(usb);
|
|
|
c401cc |
VIR_FREE(dst);
|
|
|
c401cc |
+ VIR_FREE(vroot);
|
|
|
c401cc |
return ret;
|
|
|
c401cc |
}
|
|
|
c401cc |
|
|
|
c401cc |
--
|
|
|
c401cc |
1.9.0
|
|
|
c401cc |
|