summaryrefslogtreecommitdiff
path: root/source4/torture/libsmbclient
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-10-25 19:23:02 +0200
committerJeremy Allison <jra@samba.org>2017-10-27 20:33:25 +0200
commitb012f1589b3e0cb482e14ca76b5d150792d30643 (patch)
treed92aefd6571d4bb2f89fe3f2c1f31bd45abbe8d2 /source4/torture/libsmbclient
parent9f3151a4e240480f2ed66115314b2f19a06967bf (diff)
downloadsamba-b012f1589b3e0cb482e14ca76b5d150792d30643.tar.gz
s4:torture: Avoid useless strdup in libsmbclient test
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13101 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture/libsmbclient')
-rw-r--r--source4/torture/libsmbclient/libsmbclient.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/torture/libsmbclient/libsmbclient.c b/source4/torture/libsmbclient/libsmbclient.c
index f6cd8102c4d..16ad35182cd 100644
--- a/source4/torture/libsmbclient/libsmbclient.c
+++ b/source4/torture/libsmbclient/libsmbclient.c
@@ -38,8 +38,8 @@ bool torture_libsmbclient_init_context(struct torture_context *tctx,
/* yes, libsmbclient API frees the username when freeing the context, so
* have to pass malloced data here */
- smbc_setUser(ctx, strdup(cli_credentials_get_username(
- popt_get_cmdline_credentials())));
+ smbc_setUser(ctx,
+ cli_credentials_get_username(popt_get_cmdline_credentials()));
*ctx_p = ctx;