Unverified Commit 734d1c94 authored by Alessandro Ranellucci's avatar Alessandro Ranellucci Committed by GitHub

Fix a couple memory leaks caused by files not being closed (#1670)

parent a025bca3
......@@ -42,6 +42,7 @@ func VerifyArduinoDetachedSignature(targetPath *paths.Path, signaturePath *paths
if err != nil {
panic("could not find bundled signature keys")
}
defer arduinoKeyringFile.Close()
return VerifySignature(targetPath, signaturePath, arduinoKeyringFile)
}
......
......@@ -31,6 +31,7 @@ func Parse(filename string) MessageCatalog {
}
file, err := os.Open(filename)
defer file.Close()
if err != nil {
fmt.Println(err.Error())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment