diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-06-22 12:35:06 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2023-06-22 13:21:30 +0900 |
commit | ddb431c96036a46afd5ef24ab2dde4743a11a4f8 (patch) | |
tree | 9faa0a59b1952c8a54cec030d4471d91cf169ab5 /yarp/extension.c | |
parent | 010b8a29dc152f25e6182c73b48b706dfa02c3f4 (diff) |
Fix leaked FD for an empty file
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7970
Diffstat (limited to 'yarp/extension.c')
-rw-r--r-- | yarp/extension.c | 1 |
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; } |