Fixed bug #41686 (ipv4 ip_reass() crash error) introduced some months ago while fixing bug #41041...

This commit is contained in:
Simon Goldschmidt 2014-05-19 22:07:57 +02:00
parent c3ac875055
commit c18abd4fbe

View File

@ -595,11 +595,15 @@ ip_reass(struct pbuf *p)
} }
/* find the previous entry in the linked list */ /* find the previous entry in the linked list */
if (ipr == reassdatagrams_ipv4) {
ipr_prev = NULL;
} else {
for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
if (ipr_prev->next == ipr) { if (ipr_prev->next == ipr) {
break; break;
} }
} }
}
/* release the sources allocate for the fragment queue entry */ /* release the sources allocate for the fragment queue entry */
ip_reass_dequeue_datagram(ipr, ipr_prev); ip_reass_dequeue_datagram(ipr, ipr_prev);