mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf: Don't call release_callchain_buffers() if allocation fails
When alloc_callchain_buffers() fails, it frees all of entries before return. In addition, calling the release_callchain_buffers() will cause a NULL pointer dereference since callchain_cpu_entries is not set. Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
dcd6c92267
commit
fd45c15f13
1 changed files with 0 additions and 2 deletions
|
|
@ -115,8 +115,6 @@ int get_callchain_buffers(void)
|
|||
}
|
||||
|
||||
err = alloc_callchain_buffers();
|
||||
if (err)
|
||||
release_callchain_buffers();
|
||||
exit:
|
||||
mutex_unlock(&callchain_mutex);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue