From f67cb270606c46b3d5700dbea9cde2bc8ff0df63 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 29 Nov 2018 11:10:37 +0100 Subject: [PATCH] systemctl: make sure we initialize return parameters in unit_file_find_path() on success According to our coding style return values should be initialized when we return any form of success, do so here too. --- src/systemctl/systemctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 328c11a2cd..490b739f9e 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -2443,6 +2443,9 @@ static int unit_file_find_path(LookupPaths *lp, const char *unit_name, char **re return 1; } + if (ret_unit_path) + *ret_unit_path = NULL; + return 0; }