From 465a134d54cbebc8d29b013b9f1c9c6450a8d628 Mon Sep 17 00:00:00 2001 From: ChinYikMing Date: Wed, 6 Nov 2024 04:03:19 +0800 Subject: [PATCH] Fix unmatch close function call 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. --- src/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elf.c b/src/elf.c index cfca9903..27668148 100644 --- a/src/elf.c +++ b/src/elf.c @@ -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: