projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48a50ac
)
portablectl: use CLEANUP_ARRAY
author
David Tardon
<dtardon@redhat.com>
Tue, 28 Mar 2023 08:46:20 +0000
(10:46 +0200)
committer
David Tardon
<dtardon@redhat.com>
Tue, 11 Apr 2023 14:08:00 +0000
(16:08 +0200)
src/portable/portablectl.c
patch
|
blob
|
history
diff --git
a/src/portable/portablectl.c
b/src/portable/portablectl.c
index d390a9295d7504e586dc93bad71434ec825deb06..751cef5731dc4f648a056da80259b72933256663 100644
(file)
--- a/
src/portable/portablectl.c
+++ b/
src/portable/portablectl.c
@@
-548,6
+548,8
@@
static int maybe_enable_disable(sd_bus *bus, const char *path, bool enable) {
size_t n_changes = 0;
int r;
+ CLEANUP_ARRAY(changes, n_changes, install_changes_free);
+
if (!arg_enable)
return 0;
@@
-585,7
+587,6
@@
static int maybe_enable_disable(sd_bus *bus, const char *path, bool enable) {
}
(void) bus_deserialize_and_dump_unit_file_changes(reply, arg_quiet, &changes, &n_changes);
- install_changes_free(changes, n_changes);
return 0;
}