[dpdk-stable] patch 'raw/skeleton: fix memory leak on test failure' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Thu Nov 22 17:49:14 CET 2018


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 <shreyansh.jain at nxp.com>
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 <shreyansh.jain at nxp.com>
---
 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 <shreyansh.jain at nxp.com>
 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.


More information about the stable mailing list