]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
portable: Fix memory leak in maybe_enable_disable()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 23 May 2022 13:32:42 +0000 (15:32 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 24 May 2022 01:55:09 +0000 (10:55 +0900)
Fixes #23481

src/portable/portablectl.c

index 9fb1cdffece192380f5c7e5b4020cf5f6ce75b90..0fc3a64d71c68b85ea0253197ebe755fed6bec24 100644 (file)
@@ -579,7 +579,9 @@ static int maybe_enable_disable(sd_bus *bus, const char *path, bool enable) {
                 if (r < 0)
                         return bus_log_parse_error(r);
         }
+
         (void) bus_deserialize_and_dump_unit_file_changes(reply, arg_quiet, &changes, &n_changes);
+        unit_file_changes_free(changes, n_changes);
 
         return 0;
 }