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/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5557a3a584b6f6d44586f434d902b8cc7587bf4;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 dfb3f4d262..1687329482 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; }