From: Hongwei Bi Date: Mon, 9 Sep 2013 06:05:20 +0000 (+0800) Subject: LXC: Free variable vroot in lxcDomainDetachDeviceHostdevUSBLive() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8ff46aab5f83c69b1528495a712eda262de05ad;p=thirdparty%2Flibvirt.git LXC: Free variable vroot in lxcDomainDetachDeviceHostdevUSBLive() The variable vroot should be freed in label cleanup. (cherry picked from commit 46c9bce4c8b0f2222cc50587ac968ced06eb1eff) --- diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 8c48e15152..4058ef03e1 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -3951,7 +3951,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver, virDomainHostdevDefPtr def = NULL; int idx, ret = -1; char *dst = NULL; - char *vroot; + char *vroot = NULL; virUSBDevicePtr usb = NULL; if ((idx = virDomainHostdevFind(vm->def, @@ -4011,6 +4011,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver, cleanup: virUSBDeviceFree(usb); VIR_FREE(dst); + VIR_FREE(vroot); return ret; }