diff options
author | mouring <mouring> | 2001-03-19 19:00:09 +0000 |
---|---|---|
committer | mouring <mouring> | 2001-03-19 19:00:09 +0000 |
commit | 01d007e470d36b99c364946640e0c56e59813d93 (patch) | |
tree | b19f75cda3cd31c75c3dbbe075b2ef7a56daba78 /openbsd-compat/glob.c | |
parent | f46c3d3a9a8bfce4159abeb1dbe638330b774a4c (diff) | |
download | openssh-01d007e470d36b99c364946640e0c56e59813d93.tar.gz |
- (bal) glob.c update to set gl_pathv to NULL (OpenBSD CVS).
Diffstat (limited to 'openbsd-compat/glob.c')
-rw-r--r-- | openbsd-compat/glob.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index b42cedb7..3c3a1913 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -44,7 +44,7 @@ #if 0 static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; #else -static char rcsid[] = "$OpenBSD: glob.c,v 1.9 2001/03/18 17:18:58 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: glob.c,v 1.10 2001/03/19 13:45:30 millert Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -663,8 +663,10 @@ globextend(path, pglob, limitp) pathv = pglob->gl_pathv ? realloc((char *)pglob->gl_pathv, newsize) : malloc(newsize); if (pathv == NULL) { - if (pglob->gl_pathv) + if (pglob->gl_pathv) { free(pglob->gl_pathv); + pglob->gl_pathv = NULL; + } return(GLOB_NOSPACE); } @@ -761,6 +763,7 @@ globfree(pglob) if (*pp) free(*pp); free(pglob->gl_pathv); + pglob->gl_pathv = NULL; } } |