summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dir.c b/dir.c
index fcb4be7d07..6814e4a36f 100644
--- a/dir.c
+++ b/dir.c
@@ -779,14 +779,14 @@ glob_helper(path, sub, flags, func, arg)
glob_helper(t, t+len, flags, func, arg);
free(t);
}
- tmp = link;
- link = link->next;
- free(tmp->path);
- free(tmp);
}
else {
rb_sys_warning(link->path);
}
+ tmp = link;
+ link = link->next;
+ free(tmp->path);
+ free(tmp);
}
break;
}