aboutsummaryrefslogtreecommitdiff
path: root/libbb/vfork_daemon_rexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/vfork_daemon_rexec.c')
-rw-r--r--libbb/vfork_daemon_rexec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c
index ebd32f8cd..81ae12687 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -15,13 +15,9 @@
15 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 15 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
16 */ 16 */
17 17
18#include <unistd.h>
19#include <stdio.h>
20#include <fcntl.h>
21#include <paths.h> 18#include <paths.h>
22#include "libbb.h" 19#include "libbb.h"
23 20
24
25#ifdef BB_NOMMU 21#ifdef BB_NOMMU
26void vfork_daemon_rexec(int nochdir, int noclose, 22void vfork_daemon_rexec(int nochdir, int noclose,
27 int argc, char **argv, char *foreground_opt) 23 int argc, char **argv, char *foreground_opt)
@@ -43,9 +39,9 @@ void vfork_daemon_rexec(int nochdir, int noclose,
43 close(fd); 39 close(fd);
44 } 40 }
45 41
46 vfork_args = xcalloc(sizeof(char *), argc + 3); 42 vfork_args = xzalloc(sizeof(char *) * (argc + 3));
47 vfork_args[a++] = CONFIG_BUSYBOX_EXEC_PATH; 43 vfork_args[a++] = CONFIG_BUSYBOX_EXEC_PATH;
48 while(*argv) { 44 while (*argv) {
49 vfork_args[a++] = *argv; 45 vfork_args[a++] = *argv;
50 argv++; 46 argv++;
51 } 47 }