mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf tools: Fix buffer allocation
"perf top" cores dump on my dev machine, if run from a directory where vmlinux is present: *** glibc detected *** malloc(): memory corruption: 0x085670d0 *** Signed-off-by: Eric Dumazet <[email protected]> Cc: <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
67030036eb
commit
a255a9981a
1 changed files with 1 additions and 1 deletions
|
|
@ -423,7 +423,7 @@ static int mod_dso__load_module_paths(struct mod_dso *self)
|
|||
len += strlen(uts.release);
|
||||
len += strlen("/modules.dep");
|
||||
|
||||
dpath = calloc(1, len);
|
||||
dpath = calloc(1, len + 1);
|
||||
if (dpath == NULL)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue