[ruby/yarp] Do not leak file descriptors
https://github.com/ruby/yarp/commit/83c2c45b28
This commit is contained in:
parent
b879528e24
commit
7fad7d345a
@ -72,6 +72,7 @@ source_file_load(source_t *source, VALUE filepath) {
|
|||||||
|
|
||||||
#ifdef HAVE_MMAP
|
#ifdef HAVE_MMAP
|
||||||
if (!source->size) {
|
if (!source->size) {
|
||||||
|
close(fd);
|
||||||
source->source = "";
|
source->source = "";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user