Skip to content

Commit

Permalink
fix: handle leak
Browse files Browse the repository at this point in the history
  • Loading branch information
ViRb3 committed Aug 12, 2021
1 parent df4723a commit 9ebf379
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/storage/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func loadProfile(id string) (*profile, error) {
if err != nil {
return nil, errors.WithMessagef(err, "get %s", ProfileCert)
}
defer origCertFile.Close()
origCertBytes, err := ioutil.ReadAll(origCertFile)
if err != nil {
return nil, errors.WithMessage(err, "read cert file")
Expand Down

0 comments on commit 9ebf379

Please sign in to comment.