21 lines
554 B
Plaintext
21 lines
554 B
Plaintext
--- lib/glob/glob.c
|
|
+++ lib/glob/glob.c 2009-04-21 10:51:48.478986919 +0000
|
|
@@ -96,7 +96,7 @@ int noglob_dot_filenames = 1;
|
|
int glob_ignore_case = 0;
|
|
|
|
/* Global variable to return to signify an error in globbing. */
|
|
-char *glob_error_return;
|
|
+char *glob_error_return = (char *)NULL;
|
|
|
|
static struct globval finddirs_error_return;
|
|
|
|
@@ -356,7 +356,7 @@ finddirs (pat, sdir, flags, ep, np)
|
|
*np = 0;
|
|
if (ep)
|
|
*ep = 0;
|
|
- if (r)
|
|
+ if (r && r != (char **)&glob_error_return)
|
|
free (r);
|
|
return (struct globval *)0;
|
|
}
|