summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/resolve/dns_ex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c
index 3b303d261f..7f5b84191a 100644
--- a/source4/libcli/resolve/dns_ex.c
+++ b/source4/libcli/resolve/dns_ex.c
@@ -98,7 +98,7 @@ static int reply_to_addrs(TALLOC_CTX *mem_ctx, uint32_t *a_num,
}
*cur_addrs = addrs;
- for (i = 0; reply->answers[i]; i++) {
+ for (i = 0; i < reply->num_answers; i++) {
rr = reply->answers[i];
/* we are only interested in the IN class */