vfs/lwip: clear the packet queue in '~Udp_socket_dir()'

Fixes #3836
This commit is contained in:
Christian Prochaska 2020-07-30 11:51:41 +02:00 committed by Norman Feske
parent d266f44ef3
commit c6b17be744

View File

@ -793,7 +793,7 @@ class Lwip::Udp_socket_dir final :
private:
u16_t offset = 0;
pbuf *buf;
pbuf * const buf;
public:
@ -857,6 +857,10 @@ class Lwip::Udp_socket_dir final :
virtual ~Udp_socket_dir()
{
_packet_queue.dequeue_all([&] (Packet &pkt) {
destroy(_packet_slab, &pkt);
});
udp_remove(_pcb);
_pcb = NULL;