Skip to contentSkip to conversation

test/cmdline: fix memory leak

PATCH In review David Marchand 2 participants 3 messages Oct 29, 2021 – Nov 4, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/cmdline: fix memory leak

Previous change wrongly removed a valid cmdline_free().

Fixes 6ad06203a587 ("cmdline: free on exit")
---
 app/test/test_cmdline_lib.c | 2 ++
 1 file changed, 2 insertions(+)
app/test/test_cmdline_lib.c +2 -0
index f238094b07..f50ccdb599 100644
@@ -176,6 +176,8 @@ test_cmdline_socket_fns(void)
 		printf("Error: failed to open /dev/null for reading!");
 		return -1;
 	}
+	cmdline_free(cl);
+	cl = NULL;
 
 	/* void functions */
 	cmdline_stdin_exit(NULL);
Signature · 1 line
2.23.0