Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 lib/reorder/rte_reorder.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/reorder/rte_reorder.c b/lib/reorder/rte_reorder.c
index 9445853b79cc..bc0241bfb3fd 100644
--- a/lib/reorder/rte_reorder.c
+++ b/lib/reorder/rte_reorder.c
@@ -192,10 +192,8 @@ rte_reorder_free_mbufs(struct rte_reorder_buffer *b)
 
        /* Free up the mbufs of order buffer & ready buffer */
        for (i = 0; i < b->order_buf.size; i++) {
-               if (b->order_buf.entries[i])
-                       rte_pktmbuf_free(b->order_buf.entries[i]);
-               if (b->ready_buf.entries[i])
-                       rte_pktmbuf_free(b->ready_buf.entries[i]);
+               rte_pktmbuf_free(b->order_buf.entries[i]);
+               rte_pktmbuf_free(b->ready_buf.entries[i]);
        }
 }
 
-- 
2.30.2

Reply via email to