mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
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>
This commit is contained in:
parent
ccfe7d6251
commit
9f54ab83cb
1 changed files with 1 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue