summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dir.c b/dir.c
index 212f71329a..fa1f6fbc39 100644
--- a/dir.c
+++ b/dir.c
@@ -789,7 +789,7 @@ glob_helper(path, sub, flags, func, arg)
strcpy(t+3, m);
status = glob_helper(buf, t, flags, func, arg);
free(buf);
- if (status) goto finalize;
+ if (status) break;
continue;
}
free(buf);
@@ -801,7 +801,7 @@ glob_helper(path, sub, flags, func, arg)
if (!m) {
status = glob_call_func(func, buf, arg);
free(buf);
- if (status) goto finalize;
+ if (status) break;
continue;
}
tmp = ALLOC(struct d_link);
@@ -810,8 +810,8 @@ glob_helper(path, sub, flags, func, arg)
link = tmp;
}
}
- finalize:
closedir(dirp);
+ finalize:
free(base);
free(magic);
if (link) {