* libc/bsdlib.cc (forkpty): Close master and slave if fork fails to
avoid resource leak (CID 59997). * libc/fts.c: Update to FreeBSD version 1.39 (CID 59947). * libc/minires.c (minires_get_search): Fix out-of-bounds read from words array (CID 59937).
This commit is contained in:
@ -150,6 +150,8 @@ forkpty (int *amaster, char *name, const struct termios *termp,
|
||||
switch (pid = fork ())
|
||||
{
|
||||
case -1:
|
||||
close (master);
|
||||
close (slave);
|
||||
return -1;
|
||||
case 0:
|
||||
close (master);
|
||||
|
Reference in New Issue
Block a user