Fix: memory leak in unit test
authorDavid Goulet <dgoulet@efficios.com>
Wed, 5 Feb 2014 16:48:48 +0000 (11:48 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 5 Feb 2014 17:02:06 +0000 (12:02 -0500)
Fixes coverity issue #1128896

Signed-off-by: David Goulet <dgoulet@efficios.com>
tests/unit/test_utils_expand_path.c

index 65582ff805cee08ab8c1dedeb1bba48df966f54a..1e0863fd8b39401a05fd92ef5c910124bcfc3cc6 100644 (file)
@@ -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;
                }
 
This page took 0.025684 seconds and 4 git commands to generate.