mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-05 17:28:02 +00:00
Fixed bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer
This commit is contained in:
parent
5d811d799c
commit
0e2354e658
@ -780,7 +780,8 @@ netconn_drain(struct netconn *conn)
|
||||
/* Delete and drain the acceptmbox. */
|
||||
#if LWIP_TCP
|
||||
if (sys_mbox_valid(&conn->acceptmbox)) {
|
||||
while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) {
|
||||
while ((sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) &&
|
||||
(mem != &netconn_aborted)) {
|
||||
struct netconn *newconn = (struct netconn *)mem;
|
||||
/* Only tcp pcbs have an acceptmbox, so no need to check conn->type */
|
||||
/* pcb might be set to NULL already by err_tcp() */
|
||||
|
Loading…
Reference in New Issue
Block a user