summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/sd-memfd.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-01-22 16:16:04 +0100
committerLennart Poettering <lennart@poettering.net>2014-01-22 16:16:04 +0100
commit8d1db1d154c1134c9bf92b202ef198cc79979ea8 (patch)
treeddc1b05640cb58ddcf2c2c0abac2225c1206403f /src/libsystemd/sd-bus/sd-memfd.c
parent5972fe953ec56c77936a1e612ca87d8a0e6c0c64 (diff)
bus: when allocating a memfd for usage in a bus connection, name the memfd after the bus connection
Diffstat (limited to 'src/libsystemd/sd-bus/sd-memfd.c')
-rw-r--r--src/libsystemd/sd-bus/sd-memfd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/sd-memfd.c b/src/libsystemd/sd-bus/sd-memfd.c
index 913be2086a..b78ea6a313 100644
--- a/src/libsystemd/sd-bus/sd-memfd.c
+++ b/src/libsystemd/sd-bus/sd-memfd.c
@@ -92,8 +92,10 @@ _public_ int sd_memfd_new(const char *name, sd_memfd **m) {
sz = ALIGN8(offsetof(struct kdbus_cmd_memfd_make, items)) +
ALIGN8(offsetof(struct kdbus_item, str)) +
l + 1;
+
cmd = alloca0(sz);
cmd->size = sz;
+
item = cmd->items;
item->size = ALIGN8(offsetof(struct kdbus_item, str)) + l + 1;
item->type = KDBUS_ITEM_MEMFD_NAME;