DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] test: remove unneeded null check before free
@ 2026-10-02 17:17 Stephen Hemminger
  2026-10-03  7:25 ` Marat Khalili
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2026-10-02 17:17 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Found by devtools/null_free.cocci.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-03 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02 17:17 [PATCH] test: remove unneeded null check before free Stephen Hemminger
2026-10-03  7:25 ` Marat Khalili
2026-10-03 16:00   ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox