summaryrefslogtreecommitdiffstats
path: root/src/test/test-unit-file.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-03-09 21:55:55 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-03-11 16:33:57 +0100
commitc70cac548aab08b9d9a20fec48afc4a4c86c7672 (patch)
tree62395c54a7446e51c690d35dc91b13939fa662d1 /src/test/test-unit-file.c
parentshared/sleep-config: fix unitialized variable and use STR_IN_SET (#8416) (diff)
downloadsystemd-c70cac548aab08b9d9a20fec48afc4a4c86c7672.tar.xz
systemd-c70cac548aab08b9d9a20fec48afc4a4c86c7672.zip
Introduce _cleanup_(manager_freep)
Diffstat (limited to 'src/test/test-unit-file.c')
-rw-r--r--src/test/test-unit-file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
index 40eeba6af5..f52a853c98 100644
--- a/src/test/test-unit-file.c
+++ b/src/test/test-unit-file.c
@@ -113,7 +113,7 @@ static void test_config_parse_exec(void) {
ExecCommand *c = NULL, *c1;
const char *ccc;
- Manager *m = NULL;
+ _cleanup_(manager_freep) Manager *m = NULL;
Unit *u = NULL;
r = manager_new(UNIT_FILE_USER, MANAGER_TEST_RUN_MINIMAL, &m);
@@ -443,7 +443,6 @@ static void test_config_parse_exec(void) {
exec_command_free_list(c);
unit_free(u);
- manager_free(m);
}
static void test_config_parse_log_extra_fields(void) {
@@ -461,7 +460,7 @@ static void test_config_parse_log_extra_fields(void) {
int r;
- Manager *m = NULL;
+ _cleanup_(manager_freep) Manager *m = NULL;
Unit *u = NULL;
ExecContext c = {};
@@ -508,7 +507,6 @@ static void test_config_parse_log_extra_fields(void) {
exec_context_free_log_extra_fields(&c);
unit_free(u);
- manager_free(m);
log_info("/* %s – bye */", __func__);
}