Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b4acbb9 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Arnaldo Carvalho de Melo
Browse files

perf script: Fix memory leaks in list_scripts()



In case memory resources for *buf* and *paths* were allocated, jump to
*out* and release them before return.

Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Gustavo A. R. Silva <gustavo@embeddedor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Addresses-Coverity-ID: 1444328 ("Resource leak")
Fixes: 6f3da20e ("perf report: Support builtin perf script in scripts menu")
Link: http://lkml.kernel.org/r/20190408162748.GA21008@embeddedor


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 3dab6ac0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment