summaryrefslogtreecommitdiffstats
path: root/arch/arm/oprofile
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2010-08-30 18:21:55 +0200
committerRobert Richter <robert.richter@amd.com>2010-08-31 12:51:43 +0200
commit4cbe75be5c6ae86bdc7daec864eeb2dfd66f48bb (patch)
treec0a99fac4a736cce9725b2c2da16a93ea95070fe /arch/arm/oprofile
parentc7fd239a647ead1c336a051012d6bb96465ea8c6 (diff)
downloadlinux-4cbe75be5c6ae86bdc7daec864eeb2dfd66f48bb.tar.gz
linux-4cbe75be5c6ae86bdc7daec864eeb2dfd66f48bb.tar.bz2
linux-4cbe75be5c6ae86bdc7daec864eeb2dfd66f48bb.zip
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/oprofile')
-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 c3652f73fed4..d660cb8dab36 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,