tools/proftool: fix use-after-free
authorVincent Stehlé <vincent.stehle@freescale.com>
Wed, 7 Oct 2015 13:48:48 +0000 (15:48 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 16 Nov 2015 22:22:18 +0000 (17:22 -0500)
commit1ca8f8818ba82d7d62cf87dfa3f45e011da62526
tree56d39618f56672bc3e6c9906d5c1fbbb496d4253
parent98e73c834467ef6f1d3e9a8102745e16b3128ac1
tools/proftool: fix use-after-free

The read_trace_config() can dereference the line pointer after freeing
it on its error path. Avoid that.

This was found by Coverity Scan.

Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com>
Cc: Simon Glass <sjg@chromium.org>
tools/proftool.c