Skip to content

Commit

Permalink
Pull request 2129: 6644-fix-nil-deref
Browse files Browse the repository at this point in the history
Updates #6644.

Co-authored-by: Eugene Burkov <E.Burkov@AdGuard.COM>

Squashed commit of the following:

commit a79f4a3
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Wed Jan 17 19:53:58 2024 +0300

    all: upd chlog

commit 9106dfb
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Wed Jan 17 19:43:34 2024 +0300

    home: fix nil deref
  • Loading branch information
schzhn committed Jan 18, 2024
1 parent df40da7 commit 88b0528
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ In this release, the schema version has changed from 27 to 28.

### Fixed

- Panic on using `--no-etc-hosts` flag ([#6644]).
- Schedule display in the client settings after creating or updating.
- Zero value in `querylog.size_memory` disables logging ([#6570]).
- Non-anonymized IP addresses on the dashboard ([#6584]).
Expand All @@ -95,6 +96,7 @@ In this release, the schema version has changed from 27 to 28.
[#6570]: https://github.com/AdguardTeam/AdGuardHome/issues/6570
[#6574]: https://github.com/AdguardTeam/AdGuardHome/issues/6574
[#6584]: https://github.com/AdguardTeam/AdGuardHome/issues/6584
[#6644]: https://github.com/AdguardTeam/AdGuardHome/issues/6644

[wiki-config]: https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration

Expand Down
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 88b0528

Please sign in to comment.