[systemd-commits] src/libsystemd-bus
Kay Sievers
kay at kemper.freedesktop.org
Tue Jun 4 14:40:10 PDT 2013
src/libsystemd-bus/bus-kernel.c | 2 +-
src/libsystemd-bus/bus-message.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit bf30e48fe5c6a042f157804631d7d3817c8119fc
Author: Kay Sievers <kay at vrfy.org>
Date: Tue Jun 4 23:37:57 2013 +0200
bus: unmap memfd retrieved from the memfd cache
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index ad0d573..ffa843d 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -729,7 +729,7 @@ int bus_kernel_pop_memfd(sd_bus *bus, void **address, size_t *size) {
return fd;
}
- c = &bus->memfd_cache[-- bus->n_memfd_cache];
+ c = &bus->memfd_cache[--bus->n_memfd_cache];
assert(c->fd >= 0);
assert(c->size == 0 || c->address);
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index 77a875d..760a148 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -1216,8 +1216,9 @@ static int part_make_space(
part->mapped = psz;
part->data = n;
- part->munmap_this = true;
}
+
+ part->munmap_this = true;
} else {
n = realloc(part->data, sz);
if (!n) {
@@ -2358,9 +2359,8 @@ void bus_body_part_unmap(struct bus_body_part *part) {
if (!part->data)
return;
- //FIXME: this is not set in the benchmark
- //if (!part->munmap_this)
- // return;
+ if (!part->munmap_this)
+ return;
assert_se(munmap(part->data, part->mapped) == 0);
More information about the systemd-commits
mailing list