objtool: Fix memory leak in elf_create_rela_section()
authorMartin Kepplinger <martink@posteo.de>
Thu, 14 Sep 2017 06:01:38 +0000 (08:01 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 15 Sep 2017 09:31:43 +0000 (11:31 +0200)
commit0998b7a0befdf6e734032895ee639a5e6f88cc3f
treefda8a97eb48ba960ff57e74bd04bc47e7d7fc78c
parent711aab1dbb324d321e3d84368a435a78908c7bce
objtool: Fix memory leak in elf_create_rela_section()

Let's free the allocated char array 'relaname' before returning,
in order to avoid leaking memory.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: mingo.kernel.org@gmail.com
Link: http://lkml.kernel.org/r/20170914060138.26472-1-martink@posteo.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/objtool/elf.c