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

Commit 4cbe75be authored by Robert Richter's avatar Robert Richter
Browse files

oprofile, arm: initialize perf_event pointers with NULL



The pointers must be NULL'ed to avoid double-freeing the pointers in
rare cases during reinitialization.

Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
parent c7fd239a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -351,6 +351,8 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
{
	int cpu, ret = 0;

	memset(&perf_events, 0, sizeof(perf_events));

	perf_num_counters = armpmu_get_max_events();

	counter_config = kcalloc(perf_num_counters,