mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
glob_opendir: move cleanup codes at the end
Nobu likes this arrangement.
This commit is contained in:
parent
da8af471fb
commit
2bd0f37e2b
Notes:
git
2020-06-29 11:06:31 +09:00
1 changed files with 5 additions and 5 deletions
10
dir.c
10
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 *
|
||||
|
|
Loading…
Reference in a new issue