mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
usb_drv: release interfaces on Usb session close
Interfaces that have been claimed by a component always have to be released when the session is closed in case the component malfunctioned. Fixes #1869.
This commit is contained in:
parent
245dfc2c08
commit
46e4c3dc9b
@ -576,6 +576,13 @@ class Usb::Session_component : public Session_rpc_object,
|
||||
|
||||
~Session_component()
|
||||
{
|
||||
/* release claimed interfaces */
|
||||
if (_device) {
|
||||
unsigned const num = _device->udev->actconfig->desc.bNumInterfaces;
|
||||
for (unsigned i = 0; i < num; i++)
|
||||
release_interface(i);
|
||||
}
|
||||
|
||||
_worker.stop();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user