diff options
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index cdb32c78d150..4d5092f67167 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -4960,13 +4960,20 @@ static void free_event(struct event_format *event) | |||
4960 | */ | 4960 | */ |
4961 | void pevent_free(struct pevent *pevent) | 4961 | void pevent_free(struct pevent *pevent) |
4962 | { | 4962 | { |
4963 | struct cmdline_list *cmdlist = pevent->cmdlist, *cmdnext; | 4963 | struct cmdline_list *cmdlist, *cmdnext; |
4964 | struct func_list *funclist = pevent->funclist, *funcnext; | 4964 | struct func_list *funclist, *funcnext; |
4965 | struct printk_list *printklist = pevent->printklist, *printknext; | 4965 | struct printk_list *printklist, *printknext; |
4966 | struct pevent_function_handler *func_handler; | 4966 | struct pevent_function_handler *func_handler; |
4967 | struct event_handler *handle; | 4967 | struct event_handler *handle; |
4968 | int i; | 4968 | int i; |
4969 | 4969 | ||
4970 | if (!pevent) | ||
4971 | return; | ||
4972 | |||
4973 | cmdlist = pevent->cmdlist; | ||
4974 | funclist = pevent->funclist; | ||
4975 | printklist = pevent->printklist; | ||
4976 | |||
4970 | pevent->ref_count--; | 4977 | pevent->ref_count--; |
4971 | if (pevent->ref_count) | 4978 | if (pevent->ref_count) |
4972 | return; | 4979 | return; |