From 22335d4348d4b4b615d5556947c0297e0fe5d79b Mon Sep 17 00:00:00 2001 From: Jasvinder Singh Date: Mon, 27 Apr 2020 18:13:20 +0100 Subject: [PATCH] net/softnic: fix memory leak for thread For sending request messages to data plane threads, the caller invokes thread_msg_send_recv() function which never returns null response. Thus, removed redundant check on the returned response. Coverity issue: 357717, 357772 Fixes: 70709c78fda6 ("net/softnic: add command to enable/disable pipeline") Cc: stable@dpdk.org Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu --- drivers/net/softnic/rte_eth_softnic_thread.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c index d610b1617e..d61846e030 100644 --- a/drivers/net/softnic/rte_eth_softnic_thread.c +++ b/drivers/net/softnic/rte_eth_softnic_thread.c @@ -359,8 +359,6 @@ softnic_thread_pipeline_enable(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = thread_msg_send_recv(softnic, thread_id, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -444,8 +442,6 @@ softnic_thread_pipeline_disable(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = thread_msg_send_recv(softnic, thread_id, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; -- 2.20.1