chiark / gitweb /
memfd: always create our memfds with CLOEXEC set
[elogind.git] / src / libsystemd / sd-bus / bus-kernel.c
index 0327614..3f8b0ab 100644 (file)
@@ -1129,7 +1129,7 @@ int bus_kernel_pop_memfd(sd_bus *bus, void **address, size_t *mapped, size_t *al
                 if (!g)
                         return -ENOMEM;
 
-                r = memfd_create(g, MFD_ALLOW_SEALING);
+                r = memfd_create(g, MFD_ALLOW_SEALING|MFD_CLOEXEC);
                 if (r < 0)
                         return -errno;