aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/glob.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c
index 6098766..2de0133 100644
--- a/sysdeps/generic/glob.c
+++ b/sysdeps/generic/glob.c
@@ -896,7 +896,6 @@ glob (pattern, flags, errfunc, pglob)
if (interrupt_state)
{
globfree (&dirs);
- globfree (&files);
return GLOB_ABORTED;
}
}
@@ -1007,7 +1006,10 @@ glob (pattern, flags, errfunc, pglob)
pglob->gl_pathv = new_pathv;
}
else
- return GLOB_NOMATCH;
+ {
+ globfree (&dirs);
+ return GLOB_NOMATCH;
+ }
}
globfree (&dirs);