[dpdk-stable] patch 'test/reorder: fix memory leak' has been queued to LTS release 16.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Wed Feb 7 17:47:01 CET 2018
Hi,
FYI, your patch has been queued to LTS release 16.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.
Thanks.
Luca Boccassi
---
>From 38b6c7667203b8fe488f6b4251624fdf0ade9b8b Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov at intel.com>
Date: Tue, 6 Feb 2018 13:35:38 +0000
Subject: [PATCH] test/reorder: fix memory leak
[ upstream commit 8d0e39debc2eaaf684d78d222152b34f08a325b5 ]
Add a teardown function that frees allocated resources.
Fixes: d0c9b58d7156 ("app/test: new reorder unit test")
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
app/test/test_reorder.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c
index e8a0a2f23..26dab0c2b 100644
--- a/app/test/test_reorder.c
+++ b/app/test/test_reorder.c
@@ -362,9 +362,20 @@ test_setup(void)
return 0;
}
+static void
+test_teardown(void)
+{
+ rte_reorder_free(test_params->b);
+ test_params->b = NULL;
+ rte_mempool_free(test_params->p);
+ test_params->p = NULL;
+}
+
+
static struct unit_test_suite reorder_test_suite = {
.setup = test_setup,
+ .teardown = test_teardown,
.suite_name = "Reorder Unit Test Suite",
.unit_test_cases = {
TEST_CASE(test_reorder_create),
--
2.14.2
More information about the stable
mailing list