diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c index 0bb3ba02287..2607c1558cb 100644 --- a/source4/libcli/resolve/dns_ex.c +++ b/source4/libcli/resolve/dns_ex.c @@ -245,13 +245,11 @@ static struct dns_records_container get_a_aaaa_records(TALLOC_CTX *mem_ctx, * Most of the server do it, let's ask for A specificaly. */ err = dns_lookup(tmp_ctx, name, QTYPE_A, &reply); - if (!ERR_DNS_IS_OK(err)) { - goto done; + if (ERR_DNS_IS_OK(err)) { + total = reply_to_addrs(tmp_ctx, &a_num, &addrs, + total, reply, port); } - total = reply_to_addrs(tmp_ctx, &a_num, &addrs, total, - reply, port); - } if (total) {