chiark / gitweb /
service: fix units with more than one socket
[elogind.git] / src / service.c
index 728ca0b0180ece820552ad496eff21c227a09b41..a297cd911724540c75a1d98483139f1996559e2f 100644 (file)
@@ -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);