2002-02-10 Ulrich Drepper <drepper@redhat.com>
+ * sysdeps/generic/glob.c (glob): Explicitly set gl_pathc to zero
+ after globfree() calls.
+
* elf/dl-deps.c (struct openaux_args): Add open_mode element.
(openaux): Pass open_mode as new last argument to _dl_map_object.
(_dl_map_object_deps): Add new argument open_mode. Initialize
-/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
if (onealt == NULL)
{
if (!(flags & GLOB_APPEND))
- globfree (pglob);
+ {
+ globfree (pglob);
+ pglob->gl_pathc = 0;
+ }
return GLOB_NOSPACE;
}
#endif
free (onealt);
#endif
if (!(flags & GLOB_APPEND))
- globfree (pglob);
+ {
+ globfree (pglob);
+ pglob->gl_pathc = 0;
+ }
return result;
}
{
globfree (&dirs);
globfree (pglob);
+ pglob->gl_pathc = 0;
return status;
}
{
globfree (&dirs);
globfree (pglob);
+ pglob->gl_pathc = 0;
return GLOB_NOSPACE;
}
}
{
globfree (&dirs);
globfree (pglob);
+ pglob->gl_pathc = 0;
return GLOB_NOSPACE;
}
pglob->gl_pathc - old_pathc))
{
globfree (pglob);
+ pglob->gl_pathc = 0;
return GLOB_NOSPACE;
}
}
if (new == NULL)
{
globfree (pglob);
+ pglob->gl_pathc = 0;
return GLOB_NOSPACE;
}
strcpy (&new[len - 2], "/");