From e048d5c93922762a47cbf2da518fb8686d3cd86b Mon Sep 17 00:00:00 2001 From: Kapil Sharma Date: Tue, 2 Apr 2024 12:41:50 +0530 Subject: [PATCH] Update events/syscall/delete_or_rename_shell_history.go Co-authored-by: Federico Di Pierro Signed-off-by: Kapil Sharma --- events/syscall/delete_or_rename_shell_history.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/events/syscall/delete_or_rename_shell_history.go b/events/syscall/delete_or_rename_shell_history.go index af78e3ac..6a5dce71 100644 --- a/events/syscall/delete_or_rename_shell_history.go +++ b/events/syscall/delete_or_rename_shell_history.go @@ -36,7 +36,7 @@ func DeleteOrRenameShellHistory(h events.Helper) error { if err != nil { return err } - defer file.Close() + file.Close() // Remove the file if err := os.Remove(tmpFile); err != nil {