Skip to content

Commit

Permalink
computeinfo: fix memory leak
Browse files Browse the repository at this point in the history
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 <sven.vanhaastregt@arm.com>
  • Loading branch information
svenvh committed Jul 5, 2024
1 parent 6b4d57d commit dcb314c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test_conformance/computeinfo/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit dcb314c

Please sign in to comment.