[ruby/yarp] Do not leak file descriptors

https://github.com/ruby/yarp/commit/83c2c45b28
This commit is contained in:
Kevin Newton 2023-06-22 12:01:28 -04:00 committed by Takashi Kokubun
parent b879528e24
commit 7fad7d345a

View File

@ -72,6 +72,7 @@ source_file_load(source_t *source, VALUE filepath) {
#ifdef HAVE_MMAP
if (!source->size) {
close(fd);
source->source = "";
return 0;
}