projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f05637
)
systemctl: fix code path (and memory leak) on error
author
Christian Hesse
<mail@eworm.de>
Fri, 27 May 2016 07:33:27 +0000
(09:33 +0200)
committer
Christian Hesse
<mail@eworm.de>
Fri, 27 May 2016 07:33:27 +0000
(09:33 +0200)
src/systemctl/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl/systemctl.c
b/src/systemctl/systemctl.c
index f4cdfa956e3f13912053613720b31e3561ec698a..86feefcb6528244cf8812fe711d540fefbb820a5 100644
(file)
--- a/
src/systemctl/systemctl.c
+++ b/
src/systemctl/systemctl.c
@@
-5514,7
+5514,7
@@
static int enable_unit(int argc, char *argv[], void *userdata) {
unit_file_dump_changes(r, verb, changes, n_changes, arg_quiet);
if (r < 0)
-
return r
;
+
goto finish
;
r = 0;
} else {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL, *m = NULL;
@@
-5606,7
+5606,7
@@
static int enable_unit(int argc, char *argv[], void *userdata) {
r = bus_deserialize_and_dump_unit_file_changes(reply, arg_quiet, &changes, &n_changes);
if (r < 0)
-
return r
;
+
goto finish
;
/* Try to reload if enabled */
if (!arg_no_reload)