зеркало из https://github.com/github/ruby.git
glob_opendir: move cleanup codes at the end
Nobu likes this arrangement.
This commit is contained in:
Родитель
da8af471fb
Коммит
2bd0f37e2b
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 *
|
||||
|
|
Загрузка…
Ссылка в новой задаче