Skip to content

Commit

Permalink
initiate: close event log handle (#1654)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke authored Sep 28, 2024
1 parent b67b930 commit e6aaf91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/initiate/initiate.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func logToEventToLog(eType uint16, msg string) error {
if err != nil {
return fmt.Errorf("failed to open event log: %w", err)
}
defer func(eventLog *eventlog.Log) {
_ = eventLog.Close()
}(eventLog)

p, err := windows.UTF16PtrFromString(msg)
if err != nil {
Expand Down

0 comments on commit e6aaf91

Please sign in to comment.