]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: fix memleak of ipc_namespace_path
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 7 Apr 2021 14:18:53 +0000 (16:18 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 7 Apr 2021 21:12:50 +0000 (22:12 +0100)
Fixup for a70581ffb5c13c91c76ff73ba6f5f3ff59c5a915.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32991

src/core/execute.c
test/fuzz/fuzz-unit-file/oss-fuzz-32991 [new file with mode: 0644]

index 2152fa8500077021eb7fe879a826fc6390eb0268..4d6b75e8458b8d95fafdd6f7064c61f3b621ab22 100644 (file)
@@ -4916,6 +4916,7 @@ void exec_context_done(ExecContext *c) {
         c->stdin_data_size = 0;
 
         c->network_namespace_path = mfree(c->network_namespace_path);
+        c->ipc_namespace_path = mfree(c->ipc_namespace_path);
 
         c->log_namespace = mfree(c->log_namespace);
 
diff --git a/test/fuzz/fuzz-unit-file/oss-fuzz-32991 b/test/fuzz/fuzz-unit-file/oss-fuzz-32991
new file mode 100644 (file)
index 0000000..6305b2a
Binary files /dev/null and b/test/fuzz/fuzz-unit-file/oss-fuzz-32991 differ