Skip to content

Commit

Permalink
Fix unmatch close function call
Browse files Browse the repository at this point in the history
If HAVE_MMAP is not set, the open and close file operations use the
standard C library interface, so fclose should be used instead of the
close system call.
  • Loading branch information
ChinYikMing committed Nov 5, 2024
1 parent 57ae514 commit 465a134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ bool elf_open(elf_t *e, const char *input)
#if HAVE_MMAP
close(fd);
#else
close(f);
fclose(f);
#endif

free_path:
Expand Down

0 comments on commit 465a134

Please sign in to comment.