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=c87ed6bf769c060955403cc0c2acd0d944bce0ec;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 d37962d58e..cf7b62c8c9 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -3878,7 +3878,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, @@ -3936,6 +3936,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver, cleanup: virUSBDeviceFree(usb); VIR_FREE(dst); + VIR_FREE(vroot); return ret; }