diff options
author | imp <imp@FreeBSD.org> | 1998-12-16 04:42:33 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1998-12-16 04:42:33 +0000 |
commit | a15b387ba9494284ef2acd6053a8c80d859088c6 (patch) | |
tree | c967072ac0381cbec17759ce4870b0b145eaec52 /bin | |
parent | 5315be15ac1169e2dc9312a40484408700cf349a (diff) | |
download | FreeBSD-src-a15b387ba9494284ef2acd6053a8c80d859088c6.zip FreeBSD-src-a15b387ba9494284ef2acd6053a8c80d859088c6.tar.gz |
Free memory obtained from setmode.
Obtained from: OpenBSD
Diffstat (limited to 'bin')
-rw-r--r-- | bin/chmod/chmod.c | 3 | ||||
-rw-r--r-- | bin/mkdir/mkdir.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c index 0d86824..4e17123 100644 --- a/bin/chmod/chmod.c +++ b/bin/chmod/chmod.c @@ -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); } diff --git a/bin/mkdir/mkdir.c b/bin/mkdir/mkdir.c index 84b05df..f9a7ef5 100644 --- a/bin/mkdir/mkdir.c +++ b/bin/mkdir/mkdir.c @@ -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) { |