Free memory obtained from setmode.
Obtained from: OpenBSD
This commit is contained in:
parent
81e4e6a2d6
commit
a4324714a9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41842
@ -42,7 +42,7 @@ static char const copyright[] =
|
||||
static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: chmod.c,v 1.10 1998/05/06 06:50:08 charnier Exp $";
|
||||
"$Id: chmod.c,v 1.11 1998/05/13 07:22:11 charnier Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -195,6 +195,7 @@ done: argv += optind;
|
||||
}
|
||||
if (errno)
|
||||
err(1, "fts_read");
|
||||
free(set);
|
||||
exit(rval);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ static char const copyright[] =
|
||||
static char sccsid[] = "@(#)mkdir.c 8.2 (Berkeley) 1/25/94";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: mkdir.c,v 1.13 1998/10/20 08:04:15 msmith Exp $";
|
||||
"$Id: mkdir.c,v 1.15 1998/10/23 06:28:40 msmith Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -93,6 +93,7 @@ main(argc, argv)
|
||||
if ((set = setmode(mode)) == NULL)
|
||||
errx(1, "invalid file mode: %s", mode);
|
||||
omode = getmode(set, S_IRWXU | S_IRWXG | S_IRWXO);
|
||||
free(set);
|
||||
}
|
||||
|
||||
for (exitval = 0; *argv != NULL; ++argv) {
|
||||
|
Loading…
Reference in New Issue
Block a user