about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-27 18:23:53 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-27 18:23:53 +0000
commit778cddad1775602453d3a8ca5797e39f2632de66 (patch)
tree26079811bff23132e2a8923bc90536c961242b1e /sysdeps/generic
parent866a1efa766a9e9b57fb6ef92d10952447c05bb2 (diff)
downloadglibc-778cddad1775602453d3a8ca5797e39f2632de66.tar.gz
glibc-778cddad1775602453d3a8ca5797e39f2632de66.tar.xz
glibc-778cddad1775602453d3a8ca5797e39f2632de66.zip
Update.
2004-10-27  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/glob.c (globfree): Clear gl_pathv after freeing it.
	* posix/Makefile: Add rules to build and run bug-glob2 test.
	* posix/bug-glob2.c: New test.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/glob.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c
index 658599ec1f..c0e76b377e 100644
--- a/sysdeps/generic/glob.c
+++ b/sysdeps/generic/glob.c
@@ -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