mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Free NAT entries on remove (fixes a memory leak)
This commit is contained in:
parent
a7fdb67e8f
commit
67d8c7999a
@ -43,7 +43,6 @@
|
|||||||
* them.
|
* them.
|
||||||
*
|
*
|
||||||
* - netif_remove must notify NAT code when a NAT'ed interface is removed
|
* - netif_remove must notify NAT code when a NAT'ed interface is removed
|
||||||
* - free NAT entries on remove?
|
|
||||||
* - allocate NAT entries from a new memp pool instead of the heap
|
* - allocate NAT entries from a new memp pool instead of the heap
|
||||||
* - let ttl be ticks, not seconds
|
* - let ttl be ticks, not seconds
|
||||||
*
|
*
|
||||||
@ -294,8 +293,8 @@ ip_nat_remove(const ip_nat_entry_t *remove_entry)
|
|||||||
LWIP_ASSERT("NULL != previous", NULL != previous);
|
LWIP_ASSERT("NULL != previous", NULL != previous);
|
||||||
previous->next = next;
|
previous->next = next;
|
||||||
}
|
}
|
||||||
/* @todo: free 'cur' or there will be a memory leak !?! */
|
/* free 'cur' or there will be a memory leak */
|
||||||
/* ip_nat_free(cur); */
|
ip_nat_free(cur);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
previous = cur;
|
previous = cur;
|
||||||
|
Loading…
Reference in New Issue
Block a user