summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/test-path-util.c2
-rw-r--r--src/test/test-sched-prio.c2
-rw-r--r--src/test/test-unit-name.c2
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;
}