# DP: Description: Workaround patch to make globfree() clear pglob->gl_pathc # DP: Related bugs: #264884 # DP: Dpatch author: Jeff Licquia # DP: Patch author: Jeff Licquia # DP: Upstream status: Not submitted # DP: Status Details: (gotom) I think it's harmless, but I doubt it's sanity. # It's applied for sarge LFS conformance. # However my test does not show any problems. Moreover, # if gl_pathv is not cleared after GLOB_ABORTED under # gl_pathc == 0, it's glob() bug. # This patch should be reconsidered to apply after sarge. # DP: Date: 2004-07-22 --- glibc-2.3.2-old/sysdeps/generic/glob.c 2004-07-26 17:49:07.000000000 -0400 +++ glibc-2.3.2/sysdeps/generic/glob.c 2004-07-26 17:51:14.000000000 -0400 @@ -1105,6 +1105,8 @@ 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_pathc = 0; + pglob->gl_pathv = NULL; } } #if defined _LIBC && !defined globfree