]> git.droids-corp.org - dpdk.git/commitdiff
net/softnic: fix memory leak for thread
authorJasvinder Singh <jasvinder.singh@intel.com>
Mon, 27 Apr 2020 17:13:20 +0000 (18:13 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 5 May 2020 13:54:26 +0000 (15:54 +0200)
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 <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
drivers/net/softnic/rte_eth_softnic_thread.c

index d610b1617e77c02380ffd7f01e933461adeac0ba..d61846e0304b3446cdcbe337e4b14d6c1b0787de 100644 (file)
@@ -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;