(globfree): Clear gl_pathv after freeing it.
authordrepper <drepper>
Wed, 27 Oct 2004 18:21:02 +0000 (18:21 +0000)
committerdrepper <drepper>
Wed, 27 Oct 2004 18:21:02 +0000 (18:21 +0000)
sysdeps/generic/glob.c

index 658599e..c0e76b3 100644 (file)
@@ -1135,6 +1135,7 @@ globfree (pglob)
        if (pglob->gl_pathv[pglob->gl_offs + i] != NULL)
          free ((__ptr_t) pglob->gl_pathv[pglob->gl_offs + i]);
       free ((__ptr_t) pglob->gl_pathv);
+      pglob->gl_pathv = NULL;
     }
 }
 #if defined _LIBC && !defined globfree