[dpdk-dev,1/6] test: fix memory leak in bitmap test

Message ID 9d5a3bc7a779b2dddab4256aa3e0631737861f98.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: c7e4a134e769 ("test: verify bitmap operations")
Cc: pbhagavatula@caviumnetworks.com
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 test/test/test_bitmap.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Cristian Dumitrescu Jan. 11, 2018, 2:16 p.m. UTC | #1
> -----Original Message-----
> From: Burakov, Anatoly
> Sent: Friday, December 22, 2017 10:12 AM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>;
> pbhagavatula@caviumnetworks.com
> Subject: [PATCH 1/6] test: fix memory leak in bitmap test
> 
> Fixes: c7e4a134e769 ("test: verify bitmap operations")
> Cc: pbhagavatula@caviumnetworks.com
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>  test/test/test_bitmap.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/test/test/test_bitmap.c b/test/test/test_bitmap.c
> index 5c9eee9..7045d33 100644
> --- a/test/test/test_bitmap.c
> +++ b/test/test/test_bitmap.c
> @@ -186,6 +186,9 @@ test_bitmap(void)
>  	if (test_bitmap_scan_operations(bmp) < 0)
>  		return TEST_FAILED;
> 
> +	rte_bitmap_free(bmp);
> +	rte_free(mem);
> +
>  	return TEST_SUCCESS;
>  }
> 
> --
> 2.7.4

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
  

Patch

diff --git a/test/test/test_bitmap.c b/test/test/test_bitmap.c
index 5c9eee9..7045d33 100644
--- a/test/test/test_bitmap.c
+++ b/test/test/test_bitmap.c
@@ -186,6 +186,9 @@  test_bitmap(void)
 	if (test_bitmap_scan_operations(bmp) < 0)
 		return TEST_FAILED;
 
+	rte_bitmap_free(bmp);
+	rte_free(mem);
+
 	return TEST_SUCCESS;
 }