Skip to content

Commit

Permalink
Fix leaked FD for an empty file
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jun 22, 2023
1 parent 010b8a2 commit ddb431c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions yarp/extension.c
Expand Up @@ -72,6 +72,7 @@ source_file_load(source_t *source, VALUE filepath) {

#ifdef HAVE_MMAP
if (!source->size) {
close(fd);
source->source = "";
return 0;
}
Expand Down

0 comments on commit ddb431c

Please sign in to comment.