diff options
author | Björn Töpel <bjorn@rivosinc.com> | 2025-03-18 11:16:47 +0300 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2025-03-20 20:35:07 +0300 |
commit | e16e64f9e076635df554f46e3ecdfbdd2f3867b2 (patch) | |
tree | 89c296c6e84540cd96cb746f50295ad5aaabedfb /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | |
parent | 79db658ad1cba7dbdfa03212acc7e990558f45b4 (diff) | |
download | linux-e16e64f9e076635df554f46e3ecdfbdd2f3867b2.tar.xz |
selftests/bpf: Sanitize pointer prior fclose()
There are scenarios where env.{sub,}test_state->stdout_saved, can be
NULL, e.g. sometimes when the watchdog timeout kicks in, or if the
open_memstream syscall is not available.
Avoid crashing test_progs by adding an explicit NULL check prior the
fclose() call.
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20250318081648.122523-1-bjorn@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py')
0 files changed, 0 insertions, 0 deletions