summaryrefslogtreecommitdiff
path: root/src/libelogind/sd-bus/bus-socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libelogind/sd-bus/bus-socket.c')
-rw-r--r--src/libelogind/sd-bus/bus-socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libelogind/sd-bus/bus-socket.c b/src/libelogind/sd-bus/bus-socket.c
index 0e58bc953..bb0e612b9 100644
--- a/src/libelogind/sd-bus/bus-socket.c
+++ b/src/libelogind/sd-bus/bus-socket.c
@@ -1220,7 +1220,7 @@ int bus_socket_read_message(sd_bus *bus) {
return -EIO;
}
- f = realloc(bus->fds, sizeof(int) * (bus->n_fds + n));
+ f = reallocarray(bus->fds, bus->n_fds + n, sizeof(int));
if (!f) {
close_many((int*) CMSG_DATA(cmsg), n);
return -ENOMEM;