diff mbox series

[1/2] unit: fix memory leak in test-dpp

Message ID 20240227193521.304643-1-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [1/2] unit: fix memory leak in test-dpp | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch success Fetch PR
prestwoj/iwd-ci-gitlint success GitLint
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-alpine-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-build success Build - Configure
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-alpine-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-alpine-ci-makecheck success Make Check
prestwoj/iwd-ci-incremental_build success Incremental Build with patches
prestwoj/iwd-alpine-ci-incremental_build success Incremental Build with patches
prestwoj/iwd-ci-testrunner success test-runner PASS

Commit Message

James Prestwood Feb. 27, 2024, 7:35 p.m. UTC
---
 unit/test-dpp.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Denis Kenzior Feb. 27, 2024, 8:34 p.m. UTC | #1
Hi James,

On 2/27/24 13:35, James Prestwood wrote:
> ---
>   unit/test-dpp.c | 2 ++
>   1 file changed, 2 insertions(+)
> 

Both applied, thanks.

Regards,
-Denis
diff mbox series

Patch

diff --git a/unit/test-dpp.c b/unit/test-dpp.c
index 781d494a..0a4fd01f 100644
--- a/unit/test-dpp.c
+++ b/unit/test-dpp.c
@@ -331,8 +331,10 @@  static void test_key_derivation(const void *data)
 
 	if (vector->i_asn1) {
 		HEX2BUF(vector->i_asn1, tmp, sizeof(tmp));
+		l_free(asn1);
 		asn1 = dpp_point_to_asn1(i_boot_public, &asn1_len);
 
+		l_free(from_asn1);
 		from_asn1 = dpp_point_from_asn1(asn1, asn1_len);
 
 		assert(l_ecc_points_are_equal(from_asn1, i_boot_public));