From c87ed6bf769c060955403cc0c2acd0d944bce0ec Mon Sep 17 00:00:00 2001 From: Hongwei Bi Date: Mon, 9 Sep 2013 14:05:20 +0800 Subject: [PATCH] LXC: Free variable vroot in lxcDomainDetachDeviceHostdevUSBLive() The variable vroot should be freed in label cleanup. (cherry picked from commit 46c9bce4c8b0f2222cc50587ac968ced06eb1eff) --- src/lxc/lxc_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- GitLab