From: David Tardon Date: Tue, 28 Mar 2023 08:46:20 +0000 (+0200) Subject: portablectl: use CLEANUP_ARRAY X-Git-Tag: v254-rc1~752^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b544e323eb33c03e1a4e82b458f44d8ed80fa93;p=thirdparty%2Fsystemd.git portablectl: use CLEANUP_ARRAY --- diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index d390a9295d7..751cef5731d 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; }