]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: fix post-fork memory leak
authorLuca Boccassi <bluca@debian.org>
Thu, 15 Jun 2023 18:20:05 +0000 (19:20 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 15 Jun 2023 22:25:00 +0000 (23:25 +0100)
Doesn't matter really, but it is caught by ASAN when things fail
and there's no execve, so fix it.

https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/job/upstream-vagrant-archlinux-sanitizers/3245/console

src/core/namespace.c

index b00f27e08fbc2347a6757da92649bd6f4a474205..fbcc4505b5ab04be46191b7bb6c8319c01b97a36 100644 (file)
@@ -536,7 +536,7 @@ static int append_extensions(
 
                 *((*p)++) = (MountEntry) {
                         .path_malloc = TAKE_PTR(mount_point),
-                        .source_const = TAKE_PTR(source),
+                        .source_malloc = TAKE_PTR(source),
                         .mode = EXTENSION_DIRECTORIES,
                         .ignore = ignore_enoent,
                         .has_prefix = true,