diff options
author | Björn Töpel <bjorn@rivosinc.com> | 2025-03-18 09:16:47 +0100 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2025-03-20 10:35:07 -0700 |
commit | e16e64f9e076635df554f46e3ecdfbdd2f3867b2 (patch) | |
tree | 89c296c6e84540cd96cb746f50295ad5aaabedfb /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 79db658ad1cba7dbdfa03212acc7e990558f45b4 (diff) | |
download | linux-stable-e16e64f9e076635df554f46e3ecdfbdd2f3867b2.tar.gz linux-stable-e16e64f9e076635df554f46e3ecdfbdd2f3867b2.tar.bz2 linux-stable-e16e64f9e076635df554f46e3ecdfbdd2f3867b2.zip |
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/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions