PM / devfreq: Fix perf event initialization to avoid memory leaks
Currently stop_hwmon only releases the perf events for each CPU
in the memlat device group. This leaves out the perf_event_attrs
that are not needed anymore leading to memory leaks.
This patch frees perf_event_attrs right after the perf events are
created because they are copied into the perf_event structure
when it is created for a particular event and hence do not need
to exist beyond that point.
Change-Id: If0871739ef477dfbcbbfc6ab2a631ce25deaf71c
Signed-off-by:
Rohit Gupta <rohgup@codeaurora.org>
Loading
Please register or sign in to comment