LXC: Free variable vroot in lxcDomainDetachDeviceHostdevUSBLive()

The variable vroot should be freed in label cleanup.

(cherry picked from commit 46c9bce4c8b0f2222cc50587ac968ced06eb1eff)
This commit is contained in:
Hongwei Bi 2013-09-09 14:05:20 +08:00 committed by Daniel P. Berrange
parent 9e43aaeeac
commit d2db82a2a0

View File

@ -4100,7 +4100,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,
@ -4160,6 +4160,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver,
cleanup:
virUSBDeviceFree(usb);
VIR_FREE(dst);
VIR_FREE(vroot);
return ret;
}