Commit 9f54ab83 authored by Nicolas Schier's avatar Nicolas Schier Committed by Kees Cook
Browse files

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: default avatarWangYuli <wangyuli@aosc.io>
Closes: https://lore.kernel.org/linux-kbuild/20251112114725.287349-1-wangyuli@aosc.io/


Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
Reviewed-by: default avatarWangYuli <wangyuli@aosc.io>
Signed-off-by: default avatarNicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20260114-fortify-improve-handling-of-tempfile-v2-2-63b86c4dbd0e@kernel.org


Signed-off-by: default avatarKees Cook <kees@kernel.org>
parent ccfe7d62
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ shift
__cleanup() {
	rm -f "$TMP"
}
trap __cleanup EXIT
trap __cleanup EXIT HUP INT QUIT TERM

# Function names in warnings are wrapped in backticks under UTF-8 locales.
# Run the commands with LANG=C so that grep output will not change.