diff options
author | 1998-07-03 01:10:27 +0000 | |
---|---|---|
committer | 1998-07-03 01:10:27 +0000 | |
commit | 28c377d16eb90889ee0bd3d746331c0c7d0c2455 (patch) | |
tree | 2a58b369cd20888f27988921403d44e244c05b7e | |
parent | Remove user existance disclosure through "s/key" challenges. (diff) | |
download | wireguard-openbsd-28c377d16eb90889ee0bd3d746331c0c7d0c2455.tar.xz wireguard-openbsd-28c377d16eb90889ee0bd3d746331c0c7d0c2455.zip |
do not free() before last ref; kmayer@freegate.com
-rw-r--r-- | lib/libc/gen/fts.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index f221f986959..a2489d3f333 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fts.c,v 1.15 1998/03/19 00:30:01 millert Exp $ */ +/* $OpenBSD: fts.c,v 1.16 1998/07/03 01:10:27 deraadt Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #else -static char rcsid[] = "$OpenBSD: fts.c,v 1.15 1998/03/19 00:30:01 millert Exp $"; +static char rcsid[] = "$OpenBSD: fts.c,v 1.16 1998/07/03 01:10:27 deraadt Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -245,14 +245,16 @@ fts_close(sp) (void)close(sp->fts_rfd); } - /* Free up the stream pointer. */ - free(sp); - /* Set errno and return. */ if (!ISSET(FTS_NOCHDIR) && saved_errno) { + /* Free up the stream pointer. */ + free(sp); errno = saved_errno; return (-1); } + + /* Free up the stream pointer. */ + free(sp); return (0); } |