diff --git a/kernel/events/core.c b/kernel/events/core.c index e4a43d475ba6..a0e196f973b9 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -10560,8 +10560,11 @@ perf_event_parse_addr_filter(struct perf_event *event, char *fstr, } /* ready to consume more filters */ + kfree(filename); + filename = NULL; state = IF_STATE_ACTION; filter = NULL; + kernel = 0; } }