mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 10:46:25 +00:00
usb_hid_drv: ensure freeing packets in destructor
Ref genodelabs/genode#4795
This commit is contained in:
parent
19e2b5b8b2
commit
f079d1f7c3
@ -155,6 +155,11 @@ Driver::Device::Device(Driver & driver, Label label)
|
||||
Driver::Device::~Device()
|
||||
{
|
||||
driver.devices.remove(&le);
|
||||
|
||||
while (usb.source()->ack_avail()) {
|
||||
Usb::Packet_descriptor p = usb.source()->get_acked_packet();
|
||||
usb.source()->release_packet(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user