Found by devtools/null_free.cocci.

Signed-off-by: Stephen Hemminger <[email protected]>
---
 app/test/test_cksum.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/test/test_cksum.c b/app/test/test_cksum.c
index 73f2511731..d94539820a 100644
--- a/app/test/test_cksum.c
+++ b/app/test/test_cksum.c
@@ -320,8 +320,7 @@ test_l4_cksum_mbuf_chain(struct rte_mempool *pktmbuf_pool, 
const char *pktdata,
        return 0;
 
 fail:
-       if (m_hdr)
-               rte_pktmbuf_free(m_hdr);
+       rte_pktmbuf_free(m_hdr);
 
        return -1;
 }
-- 
2.53.0

Reply via email to