summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2010-08-30 16:21:55 (GMT)
committerRobert Richter <robert.richter@amd.com>2010-08-31 10:51:43 (GMT)
commit4cbe75be5c6ae86bdc7daec864eeb2dfd66f48bb (patch)
treec0a99fac4a736cce9725b2c2da16a93ea95070fe /arch/arm
parentc7fd239a647ead1c336a051012d6bb96465ea8c6 (diff)
downloadlinux-fsl-qoriq-4cbe75be5c6ae86bdc7daec864eeb2dfd66f48bb.tar.xz
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: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/oprofile/common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index c3652f7..d660cb8 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
@@ -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,