summaryrefslogtreecommitdiff
path: root/yarp/extension.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2023-06-22 12:01:28 -0400
committerTakashi Kokubun <[email protected]>2023-06-22 09:19:39 -0700
commit7fad7d345acae5a44bc12c1ee98220b83f6f249c (patch)
tree8fb4bd282a0363357d7efe236ba4c94b3091fc79 /yarp/extension.c
parentb879528e24272d8fbe41fe0e4e07cadcca5b643c (diff)
[ruby/yarp] Do not leak file descriptors
https://github.com/ruby/yarp/commit/83c2c45b28
Diffstat (limited to 'yarp/extension.c')
-rw-r--r--yarp/extension.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/yarp/extension.c b/yarp/extension.c
index 2cec9814b1..9574916f1a 100644
--- a/yarp/extension.c
+++ b/yarp/extension.c
@@ -72,6 +72,7 @@ source_file_load(source_t *source, VALUE filepath) {
#ifdef HAVE_MMAP
if (!source->size) {
+ close(fd);
source->source = "";
return 0;
}