[dpdk-dev,4/6] test: fix memory leak in ring perf autotest

Message ID 727c5c165ffa76fd951dd47691411a3023654a48.1513867589.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Anatoly Burakov Dec. 22, 2017, 10:12 a.m. UTC
  Fixes: ac3fb3019c52 ("app: rework ring tests")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 test/test/test_ring_perf.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Olivier Matz Dec. 22, 2017, 4:28 p.m. UTC | #1
On Fri, Dec 22, 2017 at 10:12:08AM +0000, Anatoly Burakov wrote:
> Fixes: ac3fb3019c52 ("app: rework ring tests")
> Cc: stable@dpdk.org
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>  test/test/test_ring_perf.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/test/test/test_ring_perf.c b/test/test/test_ring_perf.c
> index 84d2003..b586459 100644
> --- a/test/test/test_ring_perf.c
> +++ b/test/test/test_ring_perf.c
> @@ -420,6 +420,7 @@ test_ring_perf(void)
>  		printf("\n### Testing using two NUMA nodes ###\n");
>  		run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
>  	}
> +	rte_ring_free(r);
>  	return 0;
>  }

Same comment than the functional ring test, r is static.
  

Patch

diff --git a/test/test/test_ring_perf.c b/test/test/test_ring_perf.c
index 84d2003..b586459 100644
--- a/test/test/test_ring_perf.c
+++ b/test/test/test_ring_perf.c
@@ -420,6 +420,7 @@  test_ring_perf(void)
 		printf("\n### Testing using two NUMA nodes ###\n");
 		run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
 	}
+	rte_ring_free(r);
 	return 0;
 }