addns: Fix talloc hiereachy
authorSimo Sorce <idra@samba.org>
Mon, 7 May 2012 20:14:07 +0000 (16:14 -0400)
committerAlexander Bokovoy <ab@samba.org>
Wed, 23 May 2012 14:51:48 +0000 (17:51 +0300)
Attach request to local memory context not to potentially long lived connection

lib/addns/dnssock.c

index aaeb3f03fa6c55ba557993a8353f35c73d29484f..9e769097ba961543e92ce9ec886ed378344fb0ee 100644 (file)
@@ -340,7 +340,7 @@ DNS_ERROR dns_transaction(TALLOC_CTX *mem_ctx, struct dns_connection *conn,
        struct dns_buffer *buf = NULL;
        DNS_ERROR err;
 
-       err = dns_marshall_request(conn, req, &buf);
+       err = dns_marshall_request(mem_ctx, req, &buf);
        if (!ERR_DNS_IS_OK(err)) goto error;
 
        err = dns_send(conn, buf);