diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-07-12 08:04:39 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-07-12 13:24:06 -0400 |
commit | b463b81399f0bc0d54107ef819cc0f843473c7d7 (patch) | |
tree | 107c813e54c90026e639869c36ecb75ecb811eae /src | |
parent | e8193554925a22b63bef0e77b8397b56d63a91ff (diff) |
test-path-util,test-sched-prio: uninitialize manager to appease valgrind
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test-path-util.c | 2 | ||||
-rw-r--r-- | src/test/test-sched-prio.c | 2 | ||||
-rw-r--r-- | src/test/test-unit-name.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c index 127e17803f..f396b32ffe 100644 --- a/src/test/test-path-util.c +++ b/src/test/test-path-util.c @@ -56,7 +56,7 @@ static void test_path(void) { assert_se(streq(path_get_file_name("file.../"), "")); #define test_parent(x, y) { \ - char *z; \ + char _cleanup_free_ *z = NULL; \ int r = path_get_parent(x, &z); \ printf("expected: %s\n", y ? y : "error"); \ printf("actual: %s\n", r<0 ? "error" : z); \ diff --git a/src/test/test-sched-prio.c b/src/test/test-sched-prio.c index 7af740757a..509c75f42d 100644 --- a/src/test/test-sched-prio.c +++ b/src/test/test-sched-prio.c @@ -88,5 +88,7 @@ int main(int argc, char *argv[]) { assert_se(ser->exec_context.cpu_sched_policy == SCHED_RR); assert_se(ser->exec_context.cpu_sched_priority == 99); + manager_free(m); + return EXIT_SUCCESS; } diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index 93bf28aace..2fa0294882 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -190,6 +190,8 @@ static int test_unit_printf(void) { expect(u2, "%H", host); expect(u2, "%t", "/run/user/*"); + manager_free(m); + return 0; } |