mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-10-03 20:55:18 +00:00
Fixed bug #25705 (memory leak in httpserver_raw when aborting connection)
This commit is contained in:
parent
15d75600bb
commit
0f06910f66
@ -106,13 +106,15 @@ http_poll(void *arg, struct tcp_pcb *pcb)
|
|||||||
hs = arg;
|
hs = arg;
|
||||||
|
|
||||||
/* printf("Polll\n");*/
|
/* printf("Polll\n");*/
|
||||||
if (hs == NULL) {
|
if ((hs == NULL) && (pcb->state == ESTABLISHED)) {
|
||||||
/* printf("Null, close\n");*/
|
/* printf("Null, close\n");*/
|
||||||
tcp_abort(pcb);
|
tcp_abort(pcb);
|
||||||
return ERR_ABRT;
|
return ERR_ABRT;
|
||||||
} else {
|
} else if (hs != NULL) {
|
||||||
++hs->retries;
|
++hs->retries;
|
||||||
if (hs->retries == 4) {
|
if (hs->retries == 4) {
|
||||||
|
tcp_arg(pcb, NULL);
|
||||||
|
mem_free(hs);
|
||||||
tcp_abort(pcb);
|
tcp_abort(pcb);
|
||||||
return ERR_ABRT;
|
return ERR_ABRT;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user