summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-message.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-05-14 22:52:58 +0200
committerLennart Poettering <lennart@poettering.net>2013-05-14 22:52:58 +0200
commit9b05bc48662051314b47b18a3ef8b43b193f2367 (patch)
tree8e5be0f945d549bf8f7d904edb62d1850e2129e9 /src/libsystemd-bus/bus-message.c
parentbc7fd8cdbef54ebd3902cdd455ecad3e095f7450 (diff)
bus: fix allocation of body parts from memfd
Diffstat (limited to 'src/libsystemd-bus/bus-message.c')
-rw-r--r--src/libsystemd-bus/bus-message.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index 7444a30a51..e0fb1f41db 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -433,6 +433,9 @@ static sd_bus_message *message_new(sd_bus *bus, uint8_t type) {
m->header->version = bus ? bus->message_version : 1;
m->allow_fds = !bus || bus->can_fds || (bus->state != BUS_HELLO && bus->state != BUS_RUNNING);
+ if (bus)
+ m->bus = sd_bus_ref(bus);
+
return m;
}