chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52a2ab4
)
systemctl: it's probably a good idea not to alter return parameters if we fail
author
Lennart Poettering
<lennart@poettering.net>
Thu, 17 Jan 2013 23:53:06 +0000
(
00:53
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 17 Jan 2013 23:53:09 +0000
(
00:53
+0100)
We generally follow the rule not to touch return values unless we
succeed, so for the sake of uniformity do the same here.
src/systemctl/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl/systemctl.c
b/src/systemctl/systemctl.c
index de1a022ae36174e19f4372bcab2da35c10390876..cac70673c8b81a0830035e04018329b6acc328f1 100644
(file)
--- 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;
}