From: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
To: thomas@monjalon.net
Cc: dev@dpdk.org, Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>,
stable@dpdk.org
Subject: [dpdk-stable] [PATCH v3] eal: fix resource leak
Date: Wed, 11 Oct 2017 13:53:53 +0200 [thread overview]
Message-ID: <20171011115353.40043-1-danielx.t.mrzyglod@intel.com> (raw)
In-Reply-To: <20170922144820.16590-1-danielx.t.mrzyglod@intel.com>
Memory allocated in strdup is not free.
Coverity issue: 143257
Fixes: d8a2bc71dfc2 ("log: remove app path from syslog id")
Cc: thomas@monjalon.net
Cc: stable@dpdk.org
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
v3:
* remove strdup because it's basically striped argv[0]
v2:
* Fix due to compilation errors
lib/librte_eal/linuxapp/eal/eal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 1f07347..739b61a 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -763,7 +763,7 @@ rte_eal_init(int argc, char **argv)
}
logid = strrchr(argv[0], '/');
- logid = strdup(logid ? logid + 1: argv[0]);
+ logid = logid ? logid + 1 : argv[0];
thread_id = pthread_self();
--
2.7.4
next parent reply other threads:[~2017-10-11 11:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170922144820.16590-1-danielx.t.mrzyglod@intel.com>
2017-10-11 11:53 ` Daniel Mrzyglod [this message]
2017-10-11 12:43 ` 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=20171011115353.40043-1-danielx.t.mrzyglod@intel.com \
--to=danielx.t.mrzyglod@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).