Pull request 2129: 6644-fix-nil-deref
Updates #6644. Co-authored-by: Eugene Burkov <E.Burkov@AdGuard.COM> Squashed commit of the following: commit a79f4a35f811ab85302d266839f55143afc6fff8 Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Wed Jan 17 19:53:58 2024 +0300 all: upd chlog commit 9106dfb65dcfbbe40a0c97964279e8c35d4c8c00 Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Wed Jan 17 19:43:34 2024 +0300 home: fix nil deref
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user