aboutsummaryrefslogtreecommitdiff
path: root/sbin/bectl/bectl_jail.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2019-05-28 16:12:16 +0000
committerKyle Evans <kevans@FreeBSD.org>2019-05-28 16:12:16 +0000
commit515fa27bb05ac17907b15965e9e380ad16a34f83 (patch)
tree4ec0c4fdad91b0bc2a29b85d16441a1d1e0484de /sbin/bectl/bectl_jail.c
parent1c76d3a9fbef7862810990017d56b023e2515e99 (diff)
downloadsrc-515fa27bb05ac17907b15965e9e380ad16a34f83.tar.gz
src-515fa27bb05ac17907b15965e9e380ad16a34f83.zip
Notes
Diffstat (limited to 'sbin/bectl/bectl_jail.c')
-rw-r--r--sbin/bectl/bectl_jail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/bectl/bectl_jail.c b/sbin/bectl/bectl_jail.c
index f3b2d0f53cb7..bc808001853b 100644
--- a/sbin/bectl/bectl_jail.c
+++ b/sbin/bectl/bectl_jail.c
@@ -155,7 +155,7 @@ build_jailcmd(char ***argvp, bool interactive, int argc, char *argv[])
nargv += argc;
}
- jargv = *argvp = calloc(nargv, sizeof(jargv));
+ jargv = *argvp = calloc(nargv, sizeof(*jargv));
if (jargv == NULL)
err(2, "calloc");
@@ -346,6 +346,7 @@ bectl_cmd_jail(int argc, char *argv[])
case 0:
execv("/usr/sbin/jail", jargv);
fprintf(stderr, "bectl jail: failed to execute\n");
+ return (1);
default:
waitpid(pid, NULL, 0);
}