diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-01-18 00:53:06 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-01-18 00:53:09 +0100 |
commit | d54110d11d5ea3381cfdd129356b91669b547216 (patch) | |
tree | 77a3b2e0e03751935637f50b73efd7df0eb686c8 /src | |
parent | 52a2ab41e029728ef0a4303d7aafc9d47f116004 (diff) |
systemctl: it's probably a good idea not to alter return parameters if we fail
We generally follow the rule not to touch return values unless we
succeed, so for the sake of uniformity do the same here.
Diffstat (limited to 'src')
-rw-r--r-- | src/systemctl/systemctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index de1a022ae3..cac70673c8 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -842,8 +842,9 @@ static int list_dependencies_get_dependencies(DBusConnection *bus, const char *n } finish: if (r < 0) - strv_freep(&ret); - *deps = ret; + strv_free(ret); + else + *deps = ret; return r; } |