diff --git a/kernel/events/core.c b/kernel/events/core.c index 2adde229d1af..ec2f9e433208 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -9137,8 +9137,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; } }