Skip to content

Commit

Permalink
home: fix nil deref
Browse files Browse the repository at this point in the history
  • Loading branch information
schzhn committed Jan 17, 2024
1 parent df40da7 commit 9106dfb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/home/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,11 @@ func setupDNSFilteringConf(conf *filtering.Config) (err error) {
)

conf.EtcHosts = Context.etcHosts
// TODO(s.chzhen): Use empty interface.
if Context.etcHosts == nil {
conf.EtcHosts = nil
}

conf.ConfigModified = onConfigModified
conf.HTTPRegister = httpRegister
conf.DataDir = Context.getDataDir()
Expand Down

0 comments on commit 9106dfb

Please sign in to comment.