usb_net_drv: ensure freeing packets in destructor

Ref genodelabs/genode#4795
This commit is contained in:
Stefan Kalkowski 2023-04-20 16:17:05 +02:00 committed by Christian Helmuth
parent 3c3e45746a
commit 19e2b5b8b2

View File

@ -182,6 +182,11 @@ Driver::Device::~Device()
{
driver.devices.remove(&le);
if (udev) unregister_device();
while (usb.source()->ack_avail()) {
Usb::Packet_descriptor p = usb.source()->get_acked_packet();
usb.source()->release_packet(p);
}
}