From: Jasvinder Singh <jasvinder.singh@intel.com>
To: dev@dpdk.org
Cc: cristian.dumitrescu@intel.com
Subject: [dpdk-dev] [PATCH] examples/ip_pipeline: fix resource leak for thread
Date: Mon, 27 Apr 2020 17:56:49 +0100 [thread overview]
Message-ID: <20200427165649.50591-1-jasvinder.singh@intel.com> (raw)
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
next reply other threads:[~2020-04-27 16:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 16:56 Jasvinder Singh [this message]
2020-05-24 16:19 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200427165649.50591-1-jasvinder.singh@intel.com \
--to=jasvinder.singh@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).