diff options
author | David Tardon <dtardon@redhat.com> | 2023-03-28 10:46:20 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2023-04-11 16:08:00 +0200 |
commit | 1b544e323eb33c03e1a4e82b458f44d8ed80fa93 (patch) | |
tree | bf8d1fad0de6a179651a33bd0c7f698e1dabd129 /src/portable/portablectl.c | |
parent | 48a50accfe154ebd1459179cf659103040a1e3c1 (diff) | |
download | systemd-1b544e323eb33c03e1a4e82b458f44d8ed80fa93.tar.gz |
portablectl: use CLEANUP_ARRAY
Diffstat (limited to 'src/portable/portablectl.c')
-rw-r--r-- | src/portable/portablectl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index d390a9295d..751cef5731 100644 --- 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; } |