diff options
| author | Jinjie Ruan <ruanjinjie@huawei.com> | 2026-07-29 09:29:46 +0800 |
|---|---|---|
| committer | Madhavan Srinivasan <maddy@linux.ibm.com> | 2026-07-31 17:32:23 +0530 |
| commit | 4cc4b586007fbbf8edba4f1d0849e9a06b0cf6c3 (patch) | |
| tree | c166386c96b2456457bb7cab06e0eebcb6772777 /tools/perf/scripts/python/stackcollapse.py | |
| parent | b9254d222d0b38cc6f7b73119fad6316f65278be (diff) | |
powerpc/crash: Fix possible memory leak in update_crash_elfcorehdr()
In get_crash_memory_ranges(), if crash_exclude_mem_range() failed
after realloc_mem_ranges() has successfully allocated the cmem
memory, it just returns an error but leaves cmem pointing to
the allocated memory, nor is it freed in the caller
update_crash_elfcorehdr(), which cause a memory leak, goto out
to free the cmem.
Fixes: 849599b702ef ("powerpc/crash: add crash memory hotplug support")
Reviewed-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260729012948.2797865-2-ruanjinjie@huawei.com
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
