diff options
| author | Dave Jones <[email protected]> | 2014-03-06 17:20:28 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2014-03-11 10:59:34 +0000 |
| commit | b7b4839d93e50adccef29eccb694807cdcb8bee3 (patch) | |
| tree | d015228e464ce184074c50e63f5918f7ceec0ae1 /fs/jbd2/commit.c | |
| parent | Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
| download | kernel-b7b4839d93e50adccef29eccb694807cdcb8bee3.tar.gz kernel-b7b4839d93e50adccef29eccb694807cdcb8bee3.zip | |
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 <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions
