summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/sd-memfd.c
diff options
context:
space:
mode:
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;