Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fortify: Cleanup temp file also on non-successful exit

Ensure cleanup of test_fortify.sh's temporary file also on script
interruption, or some common signals.

Reported-by: WangYuli <wangyuli@aosc.io>
Closes: https://lore.kernel.org/linux-kbuild/20251112114725.287349-1-wangyuli@aosc.io/
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: WangYuli <wangyuli@aosc.io>
Signed-off-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20260114-fortify-improve-handling-of-tempfile-v2-2-63b86c4dbd0e@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>

authored by

Nicolas Schier and committed by
Kees Cook
9f54ab83 ccfe7d62

+1 -1
+1 -1
lib/test_fortify/test_fortify.sh
··· 29 29 __cleanup() { 30 30 rm -f "$TMP" 31 31 } 32 - trap __cleanup EXIT 32 + trap __cleanup EXIT HUP INT QUIT TERM 33 33 34 34 # Function names in warnings are wrapped in backticks under UTF-8 locales. 35 35 # Run the commands with LANG=C so that grep output will not change.