kernel: boot: fix more dup() leaks reported by coverity

This commit is contained in:
Giacomo Tesio 2017-01-21 01:14:28 +01:00
parent aa25654232
commit db8aab1a04
1 changed files with 4 additions and 2 deletions

View File

@ -60,8 +60,10 @@ connectpaq(void)
*argp++ = "/dev/flash/ramdisk";
*argp = 0;
dup(p[0], 0);
dup(p[1], 1);
if(dup(p[0], 0) != 0)
fatal("dup(p[0], 0)");
if(dup(p[1], 1) != 1)
fatal("dup(p[1], 1)");
close(p[0]);
close(p[1]);
exec("/boot/paqfs", (const char**)arg);