From 89cd9660be4b12d8e13f023ce8e156ff46e4d106 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Mon, 8 Jul 2024 13:34:39 +0200 Subject: [PATCH] computeinfo: fix memory leak (#2002) Even on the common code path (i.e., no error paths taken), test_computeinfo failed to release its allocated memory, preventing a clean run with LeakSanitizer. Signed-off-by: Sven van Haastregt --- test_conformance/computeinfo/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test_conformance/computeinfo/main.cpp b/test_conformance/computeinfo/main.cpp index e382b38e4c..b6350c1c2a 100644 --- a/test_conformance/computeinfo/main.cpp +++ b/test_conformance/computeinfo/main.cpp @@ -1452,5 +1452,9 @@ int main(int argc, const char** argv) } } - return runTestHarness(argCount, argList, test_num, test_list, true, 0); + int error = runTestHarness(argCount, argList, test_num, test_list, true, 0); + + free(argList); + + return error; }