aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/sbox.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2020-09-28 10:25:48 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2020-09-28 10:25:48 -0400
commit823dd6b285d171615eb5f1ff7701e73a5758d390 (patch)
treebd37335917ff6493ff5f3abbcd63a84629dccc1f /src/firejail/sbox.c
parentfree some memory; get rid of false positive from gcc static analyzer (diff)
downloadfirejail-823dd6b285d171615eb5f1ff7701e73a5758d390.tar.gz
firejail-823dd6b285d171615eb5f1ff7701e73a5758d390.tar.zst
firejail-823dd6b285d171615eb5f1ff7701e73a5758d390.zip
clean gcc ananlyzer warnings - #3377
Diffstat (limited to 'src/firejail/sbox.c')
-rw-r--r--src/firejail/sbox.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/firejail/sbox.c b/src/firejail/sbox.c
index a92d62940..a2aaa86eb 100644
--- a/src/firejail/sbox.c
+++ b/src/firejail/sbox.c
@@ -263,6 +263,7 @@ int sbox_run(unsigned filtermask, int num, ...) {
263 263
264int sbox_run_v(unsigned filtermask, char * const arg[]) { 264int sbox_run_v(unsigned filtermask, char * const arg[]) {
265 EUID_ROOT(); 265 EUID_ROOT();
266 assert(arg);
266 267
267 if (arg_debug) { 268 if (arg_debug) {
268 printf("sbox run: "); 269 printf("sbox run: ");
@@ -288,7 +289,7 @@ int sbox_run_v(unsigned filtermask, char * const arg[]) {
288 if (waitpid(child, &status, 0) == -1 ) { 289 if (waitpid(child, &status, 0) == -1 ) {
289 errExit("waitpid"); 290 errExit("waitpid");
290 } 291 }
291 if (WIFEXITED(status) && status != 0) { 292 if (WIFEXITED(status) && WEXITSTATUS(status) != 0) {
292 fprintf(stderr, "Error: failed to run %s\n", arg[0]); 293 fprintf(stderr, "Error: failed to run %s\n", arg[0]);
293 exit(1); 294 exit(1);
294 } 295 }