Check whether setmode(3) fails and deallocate its return value after
calling getmode(3). Approved by: wollman MFC after: 1 week
This commit is contained in:
parent
1e73455ba1
commit
fd1bfb8056
@ -500,7 +500,11 @@ _("more than one -l option specified"));
|
||||
case 'm':
|
||||
{
|
||||
void *set = setmode(optarg);
|
||||
if (set == NULL)
|
||||
errx(EXIT_FAILURE,
|
||||
_("invalid file mode"));
|
||||
getmode(set, mflag);
|
||||
free(set);
|
||||
break;
|
||||
}
|
||||
case 'p':
|
||||
|
Loading…
Reference in New Issue
Block a user