diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-10-27 18:23:53 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-10-27 18:23:53 +0000 |
commit | 778cddad1775602453d3a8ca5797e39f2632de66 (patch) | |
tree | 26079811bff23132e2a8923bc90536c961242b1e | |
parent | 866a1efa766a9e9b57fb6ef92d10952447c05bb2 (diff) | |
download | glibc-778cddad1775602453d3a8ca5797e39f2632de66.zip glibc-778cddad1775602453d3a8ca5797e39f2632de66.tar.gz glibc-778cddad1775602453d3a8ca5797e39f2632de66.tar.bz2 |
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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | posix/Makefile | 12 | ||||
-rw-r--r-- | sysdeps/generic/glob.c | 1 |
3 files changed, 16 insertions, 3 deletions
@@ -1,3 +1,9 @@ +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. + 2004-10-27 Roland McGrath <roland@frob.com> * sysdeps/mach/hurd/i386/tls.h (HURD_TLS_DESC_DECL): New macro. diff --git a/posix/Makefile b/posix/Makefile index 9bf415f..cd6a52c 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -82,7 +82,7 @@ tests := tstgetopt testfnm runtests runptests \ bug-regex21 bug-regex22 bug-regex23 tst-nice tst-nanosleep \ transbug tst-rxspencer tst-pcre tst-boost \ bug-ga1 tst-vfork1 tst-vfork2 tst-waitid \ - tst-getaddrinfo2 bug-glob1 + tst-getaddrinfo2 bug-glob1 bug-glob2 xtests := bug-ga2 ifeq (yes,$(build-shared)) test-srcs := globtest @@ -101,7 +101,7 @@ generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \ bug-regex21-mem bug-regex21.mtrace \ tst-rxspencer-mem tst-rxspencer.mtrace tst-getconf.out \ tst-pcre-mem tst-pcre.mtrace tst-boost-mem tst-boost.mtrace \ - bug-ga2.mtrace bug-ga2-mem + bug-ga2.mtrace bug-ga2-mem bug-glob2.mtrace bug-glob2-mem include ../Rules @@ -194,7 +194,8 @@ tests: $(objpfx)annexc.out ifeq (no,$(cross-compiling)) tests: $(objpfx)bug-regex2-mem $(objpfx)bug-regex14-mem \ $(objpfx)bug-regex21-mem $(objpfx)tst-rxspencer-mem \ - $(objpfx)tst-pcre-mem $(objpfx)tst-boost-mem $(objpfx)tst-getconf.out + $(objpfx)tst-pcre-mem $(objpfx)tst-boost-mem $(objpfx)tst-getconf.out \ + $(objpfx)bug-glob2-mem xtests: $(objpfx)bug-ga2-mem endif @@ -251,3 +252,8 @@ $(objpfx)bug-ga2-mem: $(objpfx)bug-ga2.out $(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace > $@ bug-ga2-ENV = MALLOC_TRACE=$(objpfx)bug-ga2.mtrace + +bug-glob2-ENV = MALLOC_TRACE=$(objpfx)bug-glob2.mtrace + +$(objpfx)bug-glob2-mem: $(objpfx)bug-glob2.out + $(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@ diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c index 658599e..c0e76b3 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 |