From: Stefan Metzmacher Date: Fri, 9 Aug 2013 09:57:03 +0000 (+0200) Subject: Revert "FAILS!!! why??? libcli/nbt: avoid talloc_reference() in nbt_name_*_send()" X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=3e446005ba2fa460d0055f9ebfe3bcd5905fad57 Revert "FAILS!!! why??? libcli/nbt: avoid talloc_reference() in nbt_name_*_send()" This reverts commit 2bf76cf26c5b122be1a3c22524ef256f89afe2e6. --- diff --git a/libcli/nbt/nbtsocket.c b/libcli/nbt/nbtsocket.c index 92bd86aebb9d..711e39cbdc5a 100644 --- a/libcli/nbt/nbtsocket.c +++ b/libcli/nbt/nbtsocket.c @@ -386,8 +386,8 @@ struct nbt_name_request *nbt_name_request_send(struct nbt_name_socket *nbtsock, req->is_reply = false; req->timeout = timeout; req->num_retries = retries; - req->dest = socket_address_copy(req, dest); - if (req->dest == NULL) goto failed; + req->dest = dest; + if (talloc_reference(req, dest) == NULL) goto failed; /* we select a random transaction id unless the user supplied one */ if (request->name_trn_id == 0) { @@ -445,8 +445,8 @@ _PUBLIC_ NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock, NT_STATUS_HAVE_NO_MEMORY(req); req->nbtsock = nbtsock; - req->dest = socket_address_copy(req, dest); - if (req>dest == NULL) goto failed; + req->dest = dest; + if (talloc_reference(req, dest) == NULL) goto failed; req->state = NBT_REQUEST_SEND; req->is_reply = true;