summaryrefslogtreecommitdiff
path: root/source4/dns_server
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2012-05-30 00:23:14 +0200
committerKai Blin <kai@samba.org>2012-05-30 00:37:59 +0200
commitffc568eb4202e50d7ac203d491a6716bdea74e9a (patch)
treee955abe1c7cf64bae982dcd8947cb1fc1d738bbd /source4/dns_server
parentd5ce36b1487d679ef22198427d298ecad38b8af6 (diff)
downloadsamba-ffc568eb4202e50d7ac203d491a6716bdea74e9a.tar.gz
samba-ffc568eb4202e50d7ac203d491a6716bdea74e9a.tar.bz2
samba-ffc568eb4202e50d7ac203d491a6716bdea74e9a.zip
s4-dns: Use proper talloc hierarchy for AAAA records in create_response_rr
Diffstat (limited to 'source4/dns_server')
-rw-r--r--source4/dns_server/dns_query.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/dns_server/dns_query.c b/source4/dns_server/dns_query.c
index 419f67e905..3a77e0e08a 100644
--- a/source4/dns_server/dns_query.c
+++ b/source4/dns_server/dns_query.c
@@ -59,7 +59,8 @@ static WERROR create_response_rr(const struct dns_name_question *question,
}
break;
case DNS_QTYPE_AAAA:
- ans[ai].rdata.ipv6_record = rec->data.ipv6;
+ ans[ai].rdata.ipv6_record = talloc_strdup(ans, rec->data.ipv6);
+ W_ERROR_HAVE_NO_MEMORY(ans[ai].rdata.ipv6_record);
break;
case DNS_TYPE_NS:
ans[ai].rdata.ns_record = rec->data.ns;