Messages in this thread Patch in this message | | | From | Wei Li <> | Subject | [PATCH 4/4] perf util: Fix potential segment fault in put_tracepoints_path | Date | Thu, 21 May 2020 21:32:18 +0800 |
| |
From: Li Bin <huawei.libin@huawei.com>
This patch fix potential segment fault triggerd in put_tracepoints_path when the address of the local variable 'path' be freed in error path of record_saved_cmdline.
Signed-off-by: Li Bin <huawei.libin@huawei.com> --- tools/perf/util/trace-event-info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/trace-event-info.c b/tools/perf/util/trace-event-info.c index 086e98ff42a3..0e5c4786f296 100644 --- a/tools/perf/util/trace-event-info.c +++ b/tools/perf/util/trace-event-info.c @@ -428,7 +428,7 @@ get_tracepoints_path(struct list_head *pattrs) if (!ppath->next) { error: pr_debug("No memory to alloc tracepoints list\n"); - put_tracepoints_path(&path); + put_tracepoints_path(path.next); return NULL; } next: -- 2.17.1
| |