diff options
| author | Oleg Nesterov <[email protected]> | 2013-07-03 15:08:16 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2013-07-03 16:08:02 -0700 |
| commit | e7fd1549aeb83e34ee0955cdf5dee5d4088508f3 (patch) | |
| tree | ff08986f52f3e870205001290d7d1df5352558b8 /tools/perf/scripts/python | |
| parent | 7f57cfa4e2aa29fabe69e41529fd26578adc9b58 (diff) | |
coredump: format_corename() can leak cn->corename
do_coredump() assumes that format_corename() can only fail if
expand_corename() fails and frees cn->corename. This is not true, for
example cn_print_exe_file() can fail and in this case nobody frees
cn->corename.
Change do_coredump() to always do kfree(cn->corename) after it calls
format_corename() (NULL is fine), change expand_corename() to do nothing
if kmalloc() fails.
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Colin Walters <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: Lennart Poettering <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Acked-by: Neil Horman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions