DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/zxdh: remove unnecessary null free check
@ 2025-09-24 20:22 Stephen Hemminger
  2025-09-25 16:54 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2025-09-24 20:22 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, Junlong Wang, Lijie Shan

Found with coccinell null free script.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/zxdh/zxdh_np.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/zxdh/zxdh_np.c b/drivers/net/zxdh/zxdh_np.c
index 21c749c67a..98b95532cd 100644
--- a/drivers/net/zxdh/zxdh_np.c
+++ b/drivers/net/zxdh/zxdh_np.c
@@ -12330,8 +12330,7 @@ zxdh_np_dtb_acl_data_clear(uint32_t dev_id, uint32_t queue_id,
 				&element_id);
 	free(data_buff);
 	free(mask_buff);
-	if (eram_buff)
-		free(eram_buff);
+	free(eram_buff);
 
 	free(p_entry_arr);
 	ZXDH_COMM_CHECK_DEV_RC(dev_id, rc, "zxdh_np_dtb_acl_dma_insert");
-- 
2.47.3


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

end of thread, other threads:[~2025-09-25 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-24 20:22 [PATCH] net/zxdh: remove unnecessary null free check Stephen Hemminger
2025-09-25 16:54 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).