Control: tags -1 patch Hi all,
* Jindřich Makovička <makov...@gmail.com> [2018-03-08 19:46 +0000]: > There is a fix in upstream master. > > https://github.com/systemd/systemd/pull/8391 I managed to build Debian's 238-1 with the attached patch included. I hereby confirm that those packages fix this bug. Elimar -- The path to source is always uphill! -unknown-
From 5cbaad2f6795088db56063d20695c6444595822f Mon Sep 17 00:00:00 2001 From: Yu Watanabe <watanabe.yu+git...@gmail.com> Date: Thu, 8 Mar 2018 22:21:54 +0900 Subject: [PATCH] core: do not free heap-allocated strings (#8391) Fixes #8387. --- src/core/mount-setup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index 536c17b4d..9c27972af 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -248,6 +248,7 @@ int mount_setup_early(void) { int mount_cgroup_controllers(char ***join_controllers) { _cleanup_set_free_free_ Set *controllers = NULL; + bool has_argument = !!join_controllers; int r; if (!cg_is_legacy_wanted()) @@ -255,7 +256,7 @@ int mount_cgroup_controllers(char ***join_controllers) { /* Mount all available cgroup controllers that are built into the kernel. */ - if (!join_controllers) + if (!has_argument) /* The defaults: * mount "cpu" + "cpuacct" together, and "net_cls" + "net_prio". * @@ -300,7 +301,8 @@ int mount_cgroup_controllers(char ***join_controllers) { t = set_remove(controllers, *i); if (!t) { - free(*i); + if (has_argument) + free(*i); continue; } } -- 2.16.2
signature.asc
Description: PGP signature