fix TestCorefile1 panic for nil handling (#6802)

Signed-off-by: Paco Xu <paco.xu@daocloud.io>
This commit is contained in:
Paco Xu
2024-08-05 18:47:04 +08:00
committed by GitHub
parent a6338e924e
commit ae65f4e0c7

View File

@@ -16,5 +16,9 @@ func TestCorefile1(t *testing.T) {
acl
`
i, _, _, _ := CoreDNSServerAndPorts(corefile)
defer i.Stop()
defer func() {
if i != nil {
i.Stop()
}
}()
}