test: remove unneeded null check before free
PATCH 1/1 test: remove unneeded null check before free
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(-)
app/test/test_cksum.c +1 -2
@@ -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 ; }
Signature · 1 line
2.53.0
Quoted 1 line · Stephen Hemminger
Found by
devtools/null_free.cocci.
nit: should the commit message quote specific coccinelle output being fixed?
Quoted 10 lines
Signed-off-by Stephen Hemminger <[email protected]>--- app/test/test_cksum.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)app/test/test_cksum.c +0
-0
app/test/test_cksum.c test_l4_cksum_mbuf_chain(struct rte_mempool *pktmbuf_pool, const char *pktdata, · line 326
Quoted 9 lines
app/test/test_cksum.c +1
-2@@ -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 ; }
Acked-by Marat Khalili <[email protected]>
Quoted 5 lines · On Sat, 3 Oct 2026 08:25:40 +0100 Marat Khalili <[email protected]> wrote:
Quoted 1 line · Stephen Hemminger
Found by
devtools/null_free.cocci.nit: should the commit message quote specific coccinelle output being fixed?
Coccinelle does edit in place on tree.
./devtools/cocci.sh ./devtools/cocci/null_free.cocci