mirror of
https://github.com/coredns/coredns.git
synced 2026-10-16 23:35:43 -04:00
plugin/minimal: Fixes a nil pointer dereference panic in minimal prefetch response processing (#8506)
* plugin/minimal: Fixes a nil pointer dereference panic in minimal prefetch response processing This PR fixes a nil pointer dereference panic in minimal prefetch response processing Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix lint Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --------- Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -26,6 +26,9 @@ func (m *minimalHandler) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *
|
||||
if err != nil {
|
||||
return rcode, err
|
||||
}
|
||||
if nw.Msg == nil {
|
||||
return rcode, nil
|
||||
}
|
||||
|
||||
ty, _ := response.Typify(nw.Msg, time.Now().UTC())
|
||||
cl := response.Classify(ty)
|
||||
|
||||
Reference in New Issue
Block a user