jail: memory allocation fixes
authorDaniel Golle <daniel@makrotopia.org>
Sun, 12 Jul 2020 17:57:56 +0000 (18:57 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 13 Jul 2020 11:14:49 +0000 (12:14 +0100)
commit02eec92886639888a4a865894e203e5505c825dc
tree67fc54aeb305b02c5fe65a54bb5e37542a7f9069
parentfc9f614bf701d1531cc2969b6c66a7f4d12d2118
jail: memory allocation fixes

Make sure envp and argv are allocated and NULL-terminated arrays.
Free opts before parent process quits, free everything but argv,
envp and seccomp filter before execv into user process.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/jail.c