kernel: boot: fix more dup() leaks reported by coverity
This commit is contained in:
@@ -60,8 +60,10 @@ connectpaq(void)
|
|||||||
*argp++ = "/dev/flash/ramdisk";
|
*argp++ = "/dev/flash/ramdisk";
|
||||||
*argp = 0;
|
*argp = 0;
|
||||||
|
|
||||||
dup(p[0], 0);
|
if(dup(p[0], 0) != 0)
|
||||||
dup(p[1], 1);
|
fatal("dup(p[0], 0)");
|
||||||
|
if(dup(p[1], 1) != 1)
|
||||||
|
fatal("dup(p[1], 1)");
|
||||||
close(p[0]);
|
close(p[0]);
|
||||||
close(p[1]);
|
close(p[1]);
|
||||||
exec("/boot/paqfs", (const char**)arg);
|
exec("/boot/paqfs", (const char**)arg);
|
||||||
|
Reference in New Issue
Block a user