From 57d521cc59762afee6dba124fd08cff408110f75 Mon Sep 17 00:00:00 2001 From: wanggang26 Date: Sun, 2 Jul 2023 20:49:26 +0800 Subject: [PATCH] binfmt: Immediately exit from elf_loadbinary if elf format isn't supported --- binfmt/elf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/binfmt/elf.c b/binfmt/elf.c index 02bb603a7c..708b05afbd 100644 --- a/binfmt/elf.c +++ b/binfmt/elf.c @@ -277,6 +277,7 @@ static int elf_loadbinary(FAR struct binary_s *binp, { berr("Unexpected elf type %d\n", loadinfo.ehdr.e_type); ret = -ENOEXEC; + goto errout_with_load; } /* Return the load information */