Marcel Moolenaar b628fac5ea In globextend() when the pathv vector cannot be (re-)allocated, don't
free and clear the gl_pathv pointer in the glob_t structure. Such
breaks the invariant of the glob_t structure, as stated in the comment
right in front of the globextend() function. If gl_pathv was non-NULL,
then gl_pathc was > 0. Making gl_pathv a NULL pointer without also
setting gl_pathc to 0 is wrong.

Since we otherwise don't free the memory associated with a glob_t in
error cases, it's unlikely that this change will cause a memory leak
that wasn't already there to begin with. Callers of glob(3) must
call globfree(3) irrespective of whether glob(3) returned an error
or not.
2012-12-01 17:44:06 +00:00
..
2012-09-06 20:59:49 +00:00
2012-08-15 03:09:00 +00:00
2012-05-12 07:52:45 +00:00
2012-09-05 21:41:05 +00:00
2012-03-28 19:20:28 +00:00
2012-03-06 03:30:09 +00:00
2012-05-13 14:16:04 +00:00
2011-07-10 06:57:00 +00:00