- (bal) glob.c update to set gl_pathv to NULL (OpenBSD CVS).
This commit is contained in:
parent
a77d641cea
commit
11c78f8119
|
@ -1,5 +1,6 @@
|
|||
20010320
|
||||
- (bal) glob.c update to added GLOB_LIMITS.
|
||||
- (bal) glob.c update to added GLOB_LIMITS (OpenBSD CVS).
|
||||
- (bal) glob.c update to set gl_pathv to NULL (OpenBSD CVS).
|
||||
|
||||
20010319
|
||||
- (djm) Seed PRNG at startup, rather than waiting for arc4random calls to
|
||||
|
@ -4630,4 +4631,4 @@
|
|||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.986 2001/03/19 18:58:13 mouring Exp $
|
||||
$Id: ChangeLog,v 1.987 2001/03/19 19:00:09 mouring Exp $
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue