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 A24011B49A for ; Thu, 22 Nov 2018 17:52:02 +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 102E358E43; Thu, 22 Nov 2018 16:52:02 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id C13F466D44; Thu, 22 Nov 2018 16:52:00 +0000 (UTC) From: Kevin Traynor To: Shreyansh Jain Cc: dpdk stable Date: Thu, 22 Nov 2018 16:49:14 +0000 Message-Id: <20181122164957.13003-22-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.39]); Thu, 22 Nov 2018 16:52:02 +0000 (UTC) Subject: [dpdk-stable] patch 'raw/skeleton: fix memory leak on test failure' 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:02 -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 8d739a452b4a33d41be4a41d7781e303c425d112 Mon Sep 17 00:00:00 2001 From: Shreyansh Jain Date: Wed, 24 Oct 2018 05:33:41 +0000 Subject: [PATCH] raw/skeleton: fix memory leak on test failure [ upstream commit 88d0e47880ec729dac682be5e4242e13ffd7dcd2 ] In skeleton_rawdev unit tests, a malloc'd memory was leaking in case the next sequential test fails. This fix moves the free of the malloc'd memory above the failing test. Coverity issue: 260402 Fixes: 55ca1b0f2151 ("raw/skeleton: add test cases") Signed-off-by: Shreyansh Jain --- drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c b/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c index 3405b8984..359c9e296 100644 --- a/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c +++ b/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c @@ -295,4 +295,6 @@ test_rawdev_attr_set_get(void) ret_value); + free(dummy_value); + ret_value = 0; ret = rte_rawdev_get_attr(TEST_DEV_ID, "Test2", &ret_value); @@ -301,5 +303,4 @@ test_rawdev_attr_set_get(void) ret_value); - free(dummy_value); return TEST_SUCCESS; } -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-22 16:47:32.844569493 +0000 +++ 0022-raw-skeleton-fix-memory-leak-on-test-failure.patch 2018-11-22 16:47:32.000000000 +0000 @@ -1,8 +1,10 @@ -From 88d0e47880ec729dac682be5e4242e13ffd7dcd2 Mon Sep 17 00:00:00 2001 +From 8d739a452b4a33d41be4a41d7781e303c425d112 Mon Sep 17 00:00:00 2001 From: Shreyansh Jain Date: Wed, 24 Oct 2018 05:33:41 +0000 Subject: [PATCH] raw/skeleton: fix memory leak on test failure +[ upstream commit 88d0e47880ec729dac682be5e4242e13ffd7dcd2 ] + In skeleton_rawdev unit tests, a malloc'd memory was leaking in case the next sequential test fails. This fix moves the free of the malloc'd memory above the failing test.