From 1b544e323eb33c03e1a4e82b458f44d8ed80fa93 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 28 Mar 2023 10:46:20 +0200 Subject: [PATCH] portablectl: use CLEANUP_ARRAY --- src/portable/portablectl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.47.3