* tcp_in.c: Fix for bug #23693 as suggested by Art R. Ensure cseg is unused

if tcp_seg_copy fails.
This commit is contained in:
jifl 2008-06-24 15:46:38 +00:00
parent b94e3a874d
commit 139944a3ac
2 changed files with 13 additions and 8 deletions

View File

@ -35,6 +35,11 @@ HISTORY
++ Bugfixes:
2008-06-24 Jonathan Larmour
* tcp_in.c: Fix for bug #23693 as suggested by Art R. Ensure cseg is unused
if tcp_seg_copy fails.
2008-06-17 Simon Goldschmidt
* inet_chksum.c: Checked in some ideas of patch #6460 (loop optimizations)
and created defines for swapping bytes and folding u32 to u16.

View File

@ -1195,7 +1195,6 @@ tcp_receive(struct tcp_pcb *pcb)
} else {
pcb->ooseq = cseg;
}
}
tcp_seg_free(next);
if (cseg->next != NULL) {
next = cseg->next;
@ -1205,6 +1204,7 @@ tcp_receive(struct tcp_pcb *pcb)
pbuf_realloc(cseg->p, cseg->len);
}
}
}
break;
} else {
/* Either the lenghts are the same or the incoming