[v2] net/softnic: fix memory leak for thread
Checks
Commit Message
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")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
v2:
- change commit message
drivers/net/softnic/rte_eth_softnic_thread.c | 4 ----
1 file changed, 4 deletions(-)
Comments
On 4/27/2020 6:13 PM, Jasvinder Singh wrote:
> 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")
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Applied to dpdk-next-net/master, thanks.
@@ -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;