Skip to content

Commit

Permalink
Fix (firefox_windows.go): Release resources
Browse files Browse the repository at this point in the history
It seems `defer` keyword is using to release and close some resources.
It should be added to `getFirefoxPath` function.

Signed-off-by: Dragon1573 <[email protected]>
  • Loading branch information
Dragon1573 committed Dec 20, 2023
1 parent d7fb6e1 commit 942c4b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions interfacer/src/browsh/firefox_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ func getFirefoxPath() string {
if err != nil {
Shutdown(fmt.Errorf("Error reading Windows registry: %w", err))
}
defer k.Close()

path, _, err := k.GetStringValue("PathToExe")
if err != nil {
Shutdown(fmt.Errorf("Error reading Windows registry: %w", err))
Expand Down

0 comments on commit 942c4b6

Please sign in to comment.