DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/ip_pipeline: fix resource leak for thread
@ 2020-04-27 16:56 Jasvinder Singh
  2020-05-24 16:19 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Jasvinder Singh @ 2020-04-27 16:56 UTC (permalink / raw)
  To: dev; +Cc: cristian.dumitrescu

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 Issues: 357773, 357723
Fixes: 32e5d9b154cb ("examples/ip_pipeline: add enable and disable commands")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/ip_pipeline/thread.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c
index 272fbbeed..fda4d3c2a 100644
--- a/examples/ip_pipeline/thread.c
+++ b/examples/ip_pipeline/thread.c
@@ -325,8 +325,6 @@ thread_pipeline_enable(uint32_t thread_id,
 
 	/* Send request and wait for response */
 	rsp = thread_msg_send_recv(thread_id, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -412,8 +410,6 @@ thread_pipeline_disable(uint32_t thread_id,
 
 	/* Send request and wait for response */
 	rsp = thread_msg_send_recv(thread_id, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
-- 
2.21.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/ip_pipeline: fix resource leak for thread
  2020-04-27 16:56 [dpdk-dev] [PATCH] examples/ip_pipeline: fix resource leak for thread Jasvinder Singh
@ 2020-05-24 16:19 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2020-05-24 16:19 UTC (permalink / raw)
  To: Jasvinder Singh; +Cc: dev, cristian.dumitrescu

27/04/2020 18:56, Jasvinder Singh:
> 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 Issues: 357773, 357723
> Fixes: 32e5d9b154cb ("examples/ip_pipeline: add enable and disable commands")
> 
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

This patch has been forgotten.

Applied and squashed with "fix resource leak for pipeline".



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-24 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27 16:56 [dpdk-dev] [PATCH] examples/ip_pipeline: fix resource leak for thread Jasvinder Singh
2020-05-24 16:19 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).