Files
linux/arch/x86/kernel
Dave Jones b7b4839d93 perf/x86: Fix leak in uncore_type_init failure paths
The error path of uncore_type_init() frees up any allocations
that were made along the way, but it relies upon type->pmus
being set, which only happens if the function succeeds. As
type->pmus remains null in this case, the call to
uncore_type_exit will do nothing.

Moving the assignment earlier will allow us to actually free
those allocations should something go awry.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140306172028.GA552@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-03-11 11:59:34 +01:00
..
2011-07-01 10:37:14 +02:00
2014-01-03 14:37:13 +00:00
2012-03-28 18:11:12 +01:00
2013-11-13 12:09:05 +09:00
2013-10-29 12:01:20 +01:00
2014-03-04 23:43:33 +00:00
2012-03-28 18:11:12 +01:00
2011-03-18 10:39:30 +01:00