Fix potential Null pointer dereference in regress_dns.c (#1675) Co-authored-by: icy17 <1061499390@qq.com>