From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id AC5461B49E for ; Thu, 22 Nov 2018 17:52:05 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1FA72300294E; Thu, 22 Nov 2018 16:52:05 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B28260FD9; Thu, 22 Nov 2018 16:52:03 +0000 (UTC) From: Kevin Traynor To: Gaetan Rivet Cc: dpdk stable Date: Thu, 22 Nov 2018 16:49:16 +0000 Message-Id: <20181122164957.13003-24-ktraynor@redhat.com> In-Reply-To: <20181122164957.13003-1-ktraynor@redhat.com> References: <20181122164957.13003-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 22 Nov 2018 16:52:05 +0000 (UTC) Subject: [dpdk-stable] patch 'devargs: fix variadic parsing memory leak' has been queued to stable release 18.08.1 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: Thu, 22 Nov 2018 16:52:06 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/28/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From b691e30e7003134a056d108baa2f16b2d09467a2 Mon Sep 17 00:00:00 2001 From: Gaetan Rivet Date: Wed, 17 Oct 2018 16:30:13 +0200 Subject: [PATCH] devargs: fix variadic parsing memory leak [ upstream commit 97e476ad7c89303b21deea5b87fa0f0612d50f5c ] rte_devargs_parsef will leak memory each time it is called. The device string must be freed. Fixes: a23bc2c4e01b ("devargs: add non-variadic parsing function") Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_devargs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c index dac2402a4..19c19c7d0 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c @@ -271,4 +271,5 @@ rte_devargs_parsef(struct rte_devargs *da, const char *format, ...) size_t len; char *dev; + int ret; if (da == NULL) @@ -289,5 +290,8 @@ rte_devargs_parsef(struct rte_devargs *da, const char *format, ...) va_end(ap); - return rte_devargs_parse(da, dev); + ret = rte_devargs_parse(da, dev); + + free(dev); + return ret; } -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-22 16:47:32.893295427 +0000 +++ 0024-devargs-fix-variadic-parsing-memory-leak.patch 2018-11-22 16:47:32.000000000 +0000 @@ -1,13 +1,14 @@ -From 97e476ad7c89303b21deea5b87fa0f0612d50f5c Mon Sep 17 00:00:00 2001 +From b691e30e7003134a056d108baa2f16b2d09467a2 Mon Sep 17 00:00:00 2001 From: Gaetan Rivet Date: Wed, 17 Oct 2018 16:30:13 +0200 Subject: [PATCH] devargs: fix variadic parsing memory leak +[ upstream commit 97e476ad7c89303b21deea5b87fa0f0612d50f5c ] + rte_devargs_parsef will leak memory each time it is called. The device string must be freed. Fixes: a23bc2c4e01b ("devargs: add non-variadic parsing function") -Cc: stable@dpdk.org Signed-off-by: Gaetan Rivet --- @@ -15,16 +16,16 @@ 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c -index 69e9e32e9..c1b06095e 100644 +index dac2402a4..19c19c7d0 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c -@@ -238,4 +238,5 @@ rte_devargs_parsef(struct rte_devargs *da, const char *format, ...) +@@ -271,4 +271,5 @@ rte_devargs_parsef(struct rte_devargs *da, const char *format, ...) size_t len; char *dev; + int ret; if (da == NULL) -@@ -256,5 +257,8 @@ rte_devargs_parsef(struct rte_devargs *da, const char *format, ...) +@@ -289,5 +290,8 @@ rte_devargs_parsef(struct rte_devargs *da, const char *format, ...) va_end(ap); - return rte_devargs_parse(da, dev);