summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-06-25 10:26:34 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-06-29 11:05:41 +0900
commit2bd0f37e2bb5300991b2b497b57446a115904ee1 (patch)
tree3825cd54442927dd0c2e0368d7b1521f73f9f7d5 /dir.c
parentda8af471fb0989fe317ae4170dfa7ba7189d9a2e (diff)
glob_opendir: move cleanup codes at the end
Nobu likes this arrangement.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3247
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/dir.c b/dir.c
index 9c9d40d..9571108 100644
--- a/dir.c
+++ b/dir.c
@@ -2225,12 +2225,12 @@ glob_opendir(ruby_glob_entries_t *ent, DIR *dirp, int flags, rb_encoding *enc)
ruby_qsort(ent->sort.entries, ent->sort.count, sizeof(ent->sort.entries[0]),
glob_sort_cmp, NULL);
return ent;
-
- nomem:
- glob_dir_finish(ent, 0);
- closedir(dirp);
- return NULL;
}
+
+ nomem:
+ glob_dir_finish(ent, 0);
+ closedir(dirp);
+ return NULL;
}
static rb_dirent_t *