From a7c02f9a6ec82361b8999141224d74ed31bad630 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 4 Apr 2013 15:01:25 +0200 Subject: libsmbclient: Avoid a talloc_strdup in cli_connect_nb Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/libsmb/cliconnect.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 255b76ac19..1624e7bbb2 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2904,10 +2904,8 @@ NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss char *desthost; char *p; - desthost = talloc_strdup(talloc_tos(), host); - if (desthost == NULL) { - goto fail; - } + /* Save the original host definition for cli_state_create */ + desthost = host; p = strchr(host, '#'); if (p != NULL) { -- cgit