summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-05-28 17:04:35 +0900
committerLennart Poettering <lennart@poettering.net>2013-05-29 17:05:01 +0900
commit89b4fc46565f2cd92a538e72a720677345525d76 (patch)
treedcd5ca966e991de5162357db6160cb8e95e9be79 /src
parent98627dced719f047e9e47af1f855d9c032e548f9 (diff)
bus: properly unmap mapped area
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-bus/bus-message.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index 55c2d62885..6f2f3e9039 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -65,8 +65,8 @@ static void message_free_part(sd_bus_message *m, struct bus_body_part *part) {
if (!part->sealed)
bus_kernel_push_memfd(m->bus, part->memfd, part->data, part->mapped);
else {
- if (part->size > 0)
- assert_se(munmap(part->data, PAGE_ALIGN(part->size)) == 0);
+ if (part->mapped > 0)
+ assert_se(munmap(part->data, part->mapped) == 0);
close_nointr_nofail(part->memfd);
}
@@ -1244,7 +1244,6 @@ static void message_extend_containers(sd_bus_message *m, size_t expand) {
for (c = m->containers; c < m->containers + m->n_containers; c++)
if (c->array_size)
*c->array_size += expand;
-
}
static void *message_extend_body(sd_bus_message *m, size_t align, size_t sz) {