Skip to content

Commit

Permalink
close embed config files when they are not used anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
john-deng committed May 17, 2021
1 parent 7689185 commit 16ac60d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/system/property_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ func (b *propertyBuilder) Build(profiles ...string) (conf interface{}, err error
if err != nil {
log.Error(err)
}
_ = embedDefaultProfileConfigFile.fd.Close()
}

if defaultProfileConfigFile != nil {
Expand All @@ -350,6 +351,7 @@ func (b *propertyBuilder) Build(profiles ...string) (conf interface{}, err error
if err != nil {
log.Error(err)
}
_ = file.fd.Close()
}
}
}
Expand Down Expand Up @@ -380,6 +382,7 @@ func (b *propertyBuilder) Build(profiles ...string) (conf interface{}, err error
if err != nil {
log.Error(err)
}
_ = embedActiveProfileConfigFile.fd.Close()
}

if activeProfileConfigFile != nil {
Expand Down

0 comments on commit 16ac60d

Please sign in to comment.