summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2012-05-30 00:23:33 +0200
committerKai Blin <kai@samba.org>2012-05-30 00:38:00 +0200
commit9d128bbb628bb2240cc95695c114d8befa331a6e (patch)
tree887a4d70cdc5fa6b4c7ac94d8644472eb442cfc4 /source4
parentffc568eb4202e50d7ac203d491a6716bdea74e9a (diff)
downloadsamba-9d128bbb628bb2240cc95695c114d8befa331a6e.tar.gz
samba-9d128bbb628bb2240cc95695c114d8befa331a6e.tar.bz2
samba-9d128bbb628bb2240cc95695c114d8befa331a6e.zip
s4-dns: Use proper talloc hierarchy for NS records in create_response_rr
Diffstat (limited to 'source4')
-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 3a77e0e08a..c78fab922a 100644
--- a/source4/dns_server/dns_query.c
+++ b/source4/dns_server/dns_query.c
@@ -63,7 +63,8 @@ static WERROR create_response_rr(const struct dns_name_question *question,
W_ERROR_HAVE_NO_MEMORY(ans[ai].rdata.ipv6_record);
break;
case DNS_TYPE_NS:
- ans[ai].rdata.ns_record = rec->data.ns;
+ ans[ai].rdata.ns_record = talloc_strdup(ans, rec->data.ns);
+ W_ERROR_HAVE_NO_MEMORY(ans[ai].rdata.ns_record);
break;
case DNS_QTYPE_SRV:
ans[ai].rdata.srv_record.priority = rec->data.srv.wPriority;