summaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-04-06 02:25:39 +0200
committerLennart Poettering <lennart@poettering.net>2011-04-06 02:25:39 +0200
commit9c1b183c709b90e735b60294d7be00b37814645a (patch)
treee99ae5f89f081d4cc143bdbfee44b5599a32d074 /src/service.c
parent82e23dddebc79245ccd8333f229aa37975f81b6a (diff)
service: fix units with more than one socket
https://bugzilla.redhat.com/show_bug.cgi?id=693289
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index 728ca0b018..a297cd9117 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1592,8 +1592,8 @@ static int service_collect_fds(Service *s, int **fds, unsigned *n_fds) {
goto fail;
}
- memcpy(t, rfds, rn_fds);
- memcpy(t+rn_fds, cfds, cn_fds);
+ memcpy(t, rfds, rn_fds * sizeof(int));
+ memcpy(t+rn_fds, cfds, cn_fds * sizeof(int));
free(rfds);
free(cfds);