Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd53d337 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

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: default avatarRohit Gupta <rohgup@codeaurora.org>
parent 386d4f46
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment