From c80a51c69d6ae849c859e58aae85c7c98c927963 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 8 Aug 2013 18:11:23 +0200 Subject: [PATCH] libcli/nbt: avoid talloc_reference() in nbt_name_*_send() Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- libcli/nbt/nbtsocket.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libcli/nbt/nbtsocket.c b/libcli/nbt/nbtsocket.c index 38a2192fbcd..f682b233fd1 100644 --- a/libcli/nbt/nbtsocket.c +++ b/libcli/nbt/nbtsocket.c @@ -387,8 +387,8 @@ struct nbt_name_request *nbt_name_request_send(TALLOC_CTX *mem_ctx, req->is_reply = false; req->timeout = timeout; req->num_retries = retries; - req->dest = dest; - if (talloc_reference(req, dest) == NULL) goto failed; + req->dest = socket_address_copy(req, dest); + if (req->dest == NULL) goto failed; /* we select a random transaction id unless the user supplied one */ if (request->name_trn_id == 0) { @@ -446,8 +446,8 @@ _PUBLIC_ NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock, NT_STATUS_HAVE_NO_MEMORY(req); req->nbtsock = nbtsock; - req->dest = dest; - if (talloc_reference(req, dest) == NULL) goto failed; + req->dest = socket_address_copy(req, dest); + if (req->dest == NULL) goto failed; req->state = NBT_REQUEST_SEND; req->is_reply = true; -- 2.47.2