提交 4cbe75be 编写于 作者: R Robert Richter

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: NRobert Richter <robert.richter@amd.com>
上级 c7fd239a
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册