summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-09-17 00:05:58 +0200
committerDaniel Mack <github@zonque.org>2015-09-17 00:05:58 +0200
commit83563d169ccfaa1be8a9f95a38fa938bce3ce8fa (patch)
treed336c017fdf2d4853819f1e4b211dc0f2b25043f
parent5ee50f525f79169cb984813620ca7df144f82132 (diff)
parenta0f5ab70f367aa105bee3be4b1bb5fa27ec522d1 (diff)
Merge pull request #1285 from michich/fix-dbus-fd-recv
sd-bus: correct size calculation in DBus fd receive
-rw-r--r--src/libsystemd/sd-bus/bus-socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
index 735a775cb4..d0b1e3d7dc 100644
--- a/src/libsystemd/sd-bus/bus-socket.c
+++ b/src/libsystemd/sd-bus/bus-socket.c
@@ -985,7 +985,7 @@ int bus_socket_read_message(sd_bus *bus) {
return -EIO;
}
- f = realloc(bus->fds, sizeof(int) + (bus->n_fds + n));
+ f = realloc(bus->fds, sizeof(int) * (bus->n_fds + n));
if (!f) {
close_many((int*) CMSG_DATA(cmsg), n);
return -ENOMEM;