[PATCH 18/20] app/test-dma-perf: remove unnecessary null check
Stephen Hemminger
stephen at networkplumber.org
Fri May 8 22:33:39 CEST 2026
Remove unnecessary if check before calling rte_pktmbuf_free_bulk.
Generated by devtools/cocci/null_free.cocci
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
app/test-dma-perf/benchmark.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c
index c0ffc859bd..576c59faff 100644
--- a/app/test-dma-perf/benchmark.c
+++ b/app/test-dma-perf/benchmark.c
@@ -690,10 +690,8 @@ teardown_memory_env(uint32_t nr_buf, struct rte_mbuf **srcs, struct rte_mbuf **d
struct rte_dma_op **dma_ops)
{
/* free mbufs used in the test */
- if (srcs != NULL)
- rte_pktmbuf_free_bulk(srcs, nr_buf);
- if (dsts != NULL)
- rte_pktmbuf_free_bulk(dsts, nr_buf);
+ rte_pktmbuf_free_bulk(srcs, nr_buf);
+ rte_pktmbuf_free_bulk(dsts, nr_buf);
/* free the points for the mbufs */
rte_free(srcs);
--
2.53.0
More information about the dev
mailing list