ip4_reass: fixed duplicat NULL check

See bug #54197

Rerported-by: Andrey Vinogradov <andrey.vinogradov@teplomonitor.ru>
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
Simon Goldschmidt 2018-06-27 20:56:05 +02:00
parent 0610b34372
commit b1487e6480

View File

@ -677,7 +677,8 @@ ip4_reass(struct pbuf *p)
return NULL;
nullreturn_ipr:
if ((ipr != NULL) && (ipr->p == NULL)) {
LWIP_ASSERT("ipr != NULL", ipr != NULL);
if (ipr->p == NULL) {
/* dropped pbuf after creating a new datagram entry: remove the entry, too */
LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams);
ip_reass_dequeue_datagram(ipr, NULL);