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

Commit 68aed363 authored by Maulik Shah's avatar Maulik Shah
Browse files

cpuidle: lpm-levels: Free the allocated resource to avoid memory leak



Free the allocated memory for level_name to avoid the memory leak
in regsiter_cpu_lpm_stats().

Change-Id: I24f0feff2e05963986eaaf54610a8a5ed079b692
Signed-off-by: default avatarMohammed Khajapasha <mkhaja@codeaurora.org>
Signed-off-by: default avatarMaulik Shah <mkshah@codeaurora.org>
parent 32bf6b89
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -989,6 +989,8 @@ static void register_cpu_lpm_stats(struct lpm_cpu *cpu,

	lpm_stats_config_level("cpu", level_name, cpu->nlevels,
			parent->stats, &parent->child_cpus);

	kfree(level_name);
}

static void register_cluster_lpm_stats(struct lpm_cluster *cl,