mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 05:55:19 +00:00
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:
parent
fc14ba1b76
commit
c87ed6bf76
@ -3878,7 +3878,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver,
|
|||||||
virDomainHostdevDefPtr def = NULL;
|
virDomainHostdevDefPtr def = NULL;
|
||||||
int idx, ret = -1;
|
int idx, ret = -1;
|
||||||
char *dst = NULL;
|
char *dst = NULL;
|
||||||
char *vroot;
|
char *vroot = NULL;
|
||||||
virUSBDevicePtr usb = NULL;
|
virUSBDevicePtr usb = NULL;
|
||||||
|
|
||||||
if ((idx = virDomainHostdevFind(vm->def,
|
if ((idx = virDomainHostdevFind(vm->def,
|
||||||
@ -3936,6 +3936,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver,
|
|||||||
cleanup:
|
cleanup:
|
||||||
virUSBDeviceFree(usb);
|
virUSBDeviceFree(usb);
|
||||||
VIR_FREE(dst);
|
VIR_FREE(dst);
|
||||||
|
VIR_FREE(vroot);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user