mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
Free incoming pbuf's in the TCP event macro if the recv callback is NULL. Fixes bug #2156.
This commit is contained in:
parent
049853362a
commit
fa8f6cb204
@ -323,7 +323,8 @@ struct tcp_pcb_listen {
|
||||
(ret = (pcb)->sent((pcb)->callback_arg,(pcb),(space)))
|
||||
#define TCP_EVENT_RECV(pcb,p,err,ret) \
|
||||
if((pcb)->recv != NULL) \
|
||||
(ret = (pcb)->recv((pcb)->callback_arg,(pcb),(p),(err)))
|
||||
{ ret = (pcb)->recv((pcb)->callback_arg,(pcb),(p),(err)); } else { \
|
||||
pbuf_free(p); }
|
||||
#define TCP_EVENT_CONNECTED(pcb,err,ret) \
|
||||
if((pcb)->connected != NULL) \
|
||||
(ret = (pcb)->connected((pcb)->callback_arg,(pcb),(err)))
|
||||
|
Loading…
Reference in New Issue
Block a user