Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 734d1c9

Browse files
authored
Fix a couple memory leaks caused by files not being closed (#1670)
1 parent a025bca commit 734d1c9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

‎arduino/security/signatures.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ func VerifyArduinoDetachedSignature(targetPath *paths.Path, signaturePath *paths
4242
if err != nil {
4343
panic("could not find bundled signature keys")
4444
}
45+
defer arduinoKeyringFile.Close()
4546
return VerifySignature(targetPath, signaturePath, arduinoKeyringFile)
4647
}
4748

‎i18n/cmd/po/parser.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func Parse(filename string) MessageCatalog {
3131
}
3232

3333
file, err := os.Open(filename)
34+
defer file.Close()
3435

3536
if err != nil {
3637
fmt.Println(err.Error())

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /