aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/call-graph-from-sql.py
diff options
context:
space:
mode:
authorSanskriti Sharma <[email protected]>2018-10-02 10:29:12 -0400
committerArnaldo Carvalho de Melo <[email protected]>2018-10-08 14:23:45 -0300
commit9c8a182e5a73e01afd11742a2ab887bf338fdafd (patch)
treea285192c81f8f7edd5ae20362e83e875c4b9dd95 /tools/perf/scripts/python/call-graph-from-sql.py
parentfaedbf3fd19f2511a39397f76359e4cc6ee93072 (diff)
perf tools: Free 'printk' string in parse_ftrace_printk()
parse_ftrace_printk() tokenizes and parses a line, calling strdup() each iteration. Add code to free this temporary format string duplicate. Fixes the following coverity complaints: Error: RESOURCE_LEAK (CWE-772): tools/perf/util/trace-event-parse.c:158: overwrite_var: Overwriting "printk" in "printk = strdup(fmt + 1)" leaks the storage that "printk" points to. tools/perf/util/trace-event-parse.c:162: leaked_storage: Variable "printk" 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 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions