LXC: Free variable vroot in lxcDomainDetachDeviceHostdevUSBLive()

The variable vroot should be freed in label cleanup.

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

View File

@ -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;
}