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 {