projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7fd239
)
oprofile, arm: initialize perf_event pointers with NULL
author
Robert Richter
<robert.richter@amd.com>
Mon, 30 Aug 2010 16:21:55 +0000
(18:21 +0200)
committer
Robert Richter
<robert.richter@amd.com>
Tue, 31 Aug 2010 10:51:43 +0000
(12:51 +0200)
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>
arch/arm/oprofile/common.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/arm/oprofile/common.c
b/arch/arm/oprofile/common.c
index c3652f73fed49c96ae3da9e6c2862ecc3637bcab..d660cb8dab363db51fcb46a15c784500895c2a5a 100644
(file)
--- 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,