From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A7EB81B199; Wed, 11 Oct 2017 13:54:54 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2017 04:54:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,361,1503385200"; d="scan'208";a="1180878809" Received: from gklab-246-025.igk.intel.com (HELO Sent) ([10.217.246.25]) by orsmga001.jf.intel.com with SMTP; 11 Oct 2017 04:54:49 -0700 Received: by Sent (sSMTP sendmail emulation); Wed, 11 Oct 2017 13:54:39 +0200 From: Daniel Mrzyglod To: thomas@monjalon.net Cc: dev@dpdk.org, Daniel Mrzyglod , stable@dpdk.org Date: Wed, 11 Oct 2017 13:53:53 +0200 Message-Id: <20171011115353.40043-1-danielx.t.mrzyglod@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20170922144820.16590-1-danielx.t.mrzyglod@intel.com> References: <20170922144820.16590-1-danielx.t.mrzyglod@intel.com> Subject: [dpdk-stable] [PATCH v3] eal: fix resource leak X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Oct 2017 11:54:55 -0000 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 --- 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