Skip to content

Commit 83aa8b0

Browse files
tymoteuszblochmobica0xc0170
authored andcommitted
Supressed coverity warnings for intentional NULL passing to ip_reass_dequeue_datagram
1 parent 5820a31 commit 83aa8b0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

features/lwipstack/lwip/src/core/ipv4/lwip_ip4_frag.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,8 @@ ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *p
206206
pbuf_free(pcur);
207207
}
208208
/* Then, unchain the struct ip_reassdata from the list and free it. */
209-
if (prev != NULL) {
210-
ip_reass_dequeue_datagram(ipr, prev);
211-
}
209+
/* coverity [FORWARD_NULL]*/
210+
ip_reass_dequeue_datagram(ipr, prev);
212211
LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
213212
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed);
214213

@@ -662,9 +661,8 @@ ip4_reass(struct pbuf *p)
662661
}
663662

664663
/* release the sources allocate for the fragment queue entry */
665-
if (ipr_prev != NULL) {
666-
ip_reass_dequeue_datagram(ipr, ipr_prev);
667-
}
664+
/* coverity [FORWARD_NULL]*/
665+
ip_reass_dequeue_datagram(ipr, ipr_prev);
668666
/* and adjust the number of pbufs currently queued for reassembly. */
669667
clen = pbuf_clen(p);
670668
LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);

0 commit comments

Comments
 (0)