From: David Goulet Date: Wed, 5 Feb 2014 16:48:48 +0000 (-0500) Subject: Fix: memory leak in unit test X-Git-Tag: v2.4.0-rc5~52 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8c48d2cdd111d36b74564de30912708ab767be54;p=lttng-tools.git Fix: memory leak in unit test Fixes coverity issue #1128896 Signed-off-by: David Goulet --- diff --git a/tests/unit/test_utils_expand_path.c b/tests/unit/test_utils_expand_path.c index 65582ff80..1e0863fd8 100644 --- a/tests/unit/test_utils_expand_path.c +++ b/tests/unit/test_utils_expand_path.c @@ -141,6 +141,7 @@ int prepare_valid_results() valid_tests_expected_results[i] = malloc(PATH_MAX); if (valid_tests_expected_results[i] == NULL) { printerr("malloc expected results"); + free(empty); return 1; }