diff options
author | Daniel Baluta <dbaluta@ixiacom.com> | 2013-02-06 16:29:20 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-02-14 15:06:39 -0500 |
commit | 02e176af92f3e2e9ec3a48792036566af2dcd534 (patch) | |
tree | 9d4dd00367eeb909edf4c1a30e2e8178efb9dc5a /kernel/events | |
parent | 85df3b3769222894e9692b383c7af124b7721086 (diff) |
perf/hwbp: Fix cleanup in case of kzalloc failure
Obviously this is a typo and could result in memory leaks if kzalloc
fails on a given cpu.
Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1360186160-7566-1-git-send-email-dbaluta@ixiacom.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/hw_breakpoint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c index fe8a916507ed..a64f8aeb5c1f 100644 --- a/kernel/events/hw_breakpoint.c +++ b/kernel/events/hw_breakpoint.c | |||
@@ -676,7 +676,7 @@ int __init init_hw_breakpoint(void) | |||
676 | err_alloc: | 676 | err_alloc: |
677 | for_each_possible_cpu(err_cpu) { | 677 | for_each_possible_cpu(err_cpu) { |
678 | for (i = 0; i < TYPE_MAX; i++) | 678 | for (i = 0; i < TYPE_MAX; i++) |
679 | kfree(per_cpu(nr_task_bp_pinned[i], cpu)); | 679 | kfree(per_cpu(nr_task_bp_pinned[i], err_cpu)); |
680 | if (err_cpu == cpu) | 680 | if (err_cpu == cpu) |
681 | break; | 681 | break; |
682 | } | 682 | } |