summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2002-07-12 01:47:41 +0000
committermillert <millert@openbsd.org>2002-07-12 01:47:41 +0000
commitbe1db858c924275d835b12b4f1eceb533c032df7 (patch)
treecf86d6659b94a3087bfbec90e06de1e672a66123 /lib/libc
parentFix vm -> uvm in a comment. (diff)
downloadwireguard-openbsd-be1db858c924275d835b12b4f1eceb533c032df7.tar.xz
wireguard-openbsd-be1db858c924275d835b12b4f1eceb533c032df7.zip
Add a missing check for fts_alloc() returning NULL; Chad Loder
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/fts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
index 079b4e806c9..0217e6bae25 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fts.c,v 1.31 2002/06/27 22:21:28 deraadt Exp $ */
+/* $OpenBSD: fts.c,v 1.32 2002/07/12 01:47:41 millert 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.31 2002/06/27 22:21:28 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: fts.c,v 1.32 2002/07/12 01:47:41 millert Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -125,7 +125,8 @@ fts_open(argv, options, compar)
goto mem3;
}
- p = fts_alloc(sp, *argv, len);
+ if ((p = fts_alloc(sp, *argv, len)) == NULL)
+ goto mem3;
p->fts_level = FTS_ROOTLEVEL;
p->fts_parent = parent;
p->fts_accpath = p->fts_name;