Checking for null before calling rte_mempool_free is
unnecessary.

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 lib/graph/graph_pcap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/graph/graph_pcap.c b/lib/graph/graph_pcap.c
index 9cbd1b8fdb6c..6c433300290b 100644
--- a/lib/graph/graph_pcap.c
+++ b/lib/graph/graph_pcap.c
@@ -40,8 +40,7 @@ void
 graph_pcap_exit(struct rte_graph *graph)
 {
        if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-               if (pkt_mp)
-                       rte_mempool_free(pkt_mp);
+               rte_mempool_free(pkt_mp);
 
        if (pcapng_fd) {
                rte_pcapng_close(pcapng_fd);
-- 
2.39.2

Reply via email to