1
0
Fork 0
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:
卜部昌平 2020-06-25 10:26:34 +09:00
parent da8af471fb
commit 2bd0f37e2b
Notes: git 2020-06-29 11:06:31 +09:00

10
dir.c
View file

@ -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 *