mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-07-04 15:29:30 +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;
|
||||
|
||||
/* printf("Polll\n");*/
|
||||
if (hs == NULL) {
|
||||
if ((hs == NULL) && (pcb->state == ESTABLISHED)) {
|
||||
/* printf("Null, close\n");*/
|
||||
tcp_abort(pcb);
|
||||
return ERR_ABRT;
|
||||
} else {
|
||||
} else if (hs != NULL) {
|
||||
++hs->retries;
|
||||
if (hs->retries == 4) {
|
||||
tcp_arg(pcb, NULL);
|
||||
mem_free(hs);
|
||||
tcp_abort(pcb);
|
||||
return ERR_ABRT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user