]> andersk Git - openssh.git/commitdiff
- (bal) glob.c update to set gl_pathv to NULL (OpenBSD CVS).
authormouring <mouring>
Mon, 19 Mar 2001 19:00:09 +0000 (19:00 +0000)
committermouring <mouring>
Mon, 19 Mar 2001 19:00:09 +0000 (19:00 +0000)
ChangeLog
openbsd-compat/glob.c

index 0d26ff5107931aac598efd221659fda9116650b0..7128df078f8e149be63d66d2422758a94b64301f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 
index b42cedb79edb554c7c7bdf3f0881fdd009301ea8..3c3a19131d83d5fe50ef565f3fd05a8a274cf6ac 100644 (file)
@@ -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;
        }
 }
 
This page took 0.056664 seconds and 5 git commands to generate.