Skip to content

Commit 6f561a5

Browse files
committed
Fix config file fd never close
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
1 parent fbfedca commit 6f561a5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

unit/unit.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ func (u *Unit) loadConfigurationFromFile(filename string) error {
385385
if err != nil {
386386
return fmt.Errorf("cannot open file: %w", err)
387387
}
388+
defer file.Close()
388389

389390
blob, err := io.ReadAll(file)
390391
if err != nil {

0 commit comments

Comments
 (0)