binfmt/elf: fix issue of file not closing after being opened.

When opening the file succeeds but reading the file fails in
modlib_initialize, this will result in the open file not be closed.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
This commit is contained in:
yangsong8
2025-06-07 20:13:51 +08:00
committed by Xiang Xiao
parent 7907a5b1c3
commit 130b2154aa
+1 -1
View File
@@ -107,7 +107,7 @@ static int elf_loadbinary(FAR struct binary_s *binp,
if (ret != 0)
{
berr("Failed to initialize to load ELF program binary: %d\n", ret);
return ret;
goto errout_with_init;
}
/* Load the program binary */