diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-11-02 10:57:24 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-11-02 10:57:24 +0100 |
commit | 3357b0d3c7323d73806571192e9f633bb6ba3d54 (patch) | |
tree | a92fb225bfdda901783ad662a1fea0baddfb81e1 /tools/objtool | |
parent | x86/asm: Don't use the confusing '.ifeq' directive (diff) | |
parent | ptrace,x86: Make user_64bit_mode() available to 32-bit builds (diff) | |
download | linux-3357b0d3c7323d73806571192e9f633bb6ba3d54.tar.xz linux-3357b0d3c7323d73806571192e9f633bb6ba3d54.zip |
Merge branch 'x86/mpx/prep' into x86/asm
Pick up some of the MPX commits that modify the syscall entry code,
to have a common base and to reduce conflicts.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/objtool')
-rw-r--r-- | tools/objtool/check.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 83f370fa00c2..9b341584eb1b 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -267,12 +267,13 @@ static int decode_instructions(struct objtool_file *file) &insn->immediate, &insn->stack_op); if (ret) - return ret; + goto err; if (!insn->type || insn->type > INSN_LAST) { WARN_FUNC("invalid instruction type %d", insn->sec, insn->offset, insn->type); - return -1; + ret = -1; + goto err; } hash_add(file->insn_hash, &insn->hash, insn->offset); @@ -296,6 +297,10 @@ static int decode_instructions(struct objtool_file *file) } return 0; + +err: + free(insn); + return ret; } /* |