aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib/code-patching.c
diff options
context:
space:
mode:
authorSanskriti Sharma <[email protected]>2018-10-02 14:29:14 +0000
committerArnaldo Carvalho de Melo <[email protected]>2018-10-08 17:23:46 +0000
commit1e44224fb0528b4c0cc176bde2bb31e9127eb14b (patch)
treed6925aa5ef68766b81af06976303945bca90e409 /arch/powerpc/lib/code-patching.c
parentperf tools: Avoid double free in read_event_file() (diff)
downloadkernel-1e44224fb0528b4c0cc176bde2bb31e9127eb14b.tar.gz
kernel-1e44224fb0528b4c0cc176bde2bb31e9127eb14b.zip
perf tools: Free temporary 'sys' string in read_event_files()
For each system in a given pevent, read_event_files() reads in a temporary 'sys' string. Be sure to free this string before moving onto to the next system and/or leaving read_event_files(). Fixes the following coverity complaints: Error: RESOURCE_LEAK (CWE-772): tools/perf/util/trace-event-read.c:343: overwrite_var: Overwriting "sys" in "sys = read_string()" leaks the storage that "sys" points to. tools/perf/util/trace-event-read.c:353: leaked_storage: Variable "sys" going out of scope leaks the storage it points to. Signed-off-by: Sanskriti Sharma <[email protected]> Reviewed-by: Jiri Olsa <[email protected]> Cc: Joe Lawrence <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions