kernel: boot: fix more dup() leaks reported by coverity
This commit is contained in:
parent
aa25654232
commit
db8aab1a04
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue