summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-04-04 15:01:25 +0200
committerJeremy Allison <jra@samba.org>2013-04-11 14:41:25 -0700
commita7c02f9a6ec82361b8999141224d74ed31bad630 (patch)
treea896d9f21d929686b1695c1251940ed361381346 /source3/libsmb
parent3b3dacf20dc0230be686fc05a65bd699c62a58ec (diff)
downloadsamba-a7c02f9a6ec82361b8999141224d74ed31bad630.tar.gz
samba-a7c02f9a6ec82361b8999141224d74ed31bad630.tar.bz2
samba-a7c02f9a6ec82361b8999141224d74ed31bad630.zip
libsmbclient: Avoid a talloc_strdup in cli_connect_nb
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c6
1 files 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) {