From: Andreas Schneider Date: Wed, 25 Oct 2017 17:23:02 +0000 (+0200) Subject: s4:torture: Avoid useless strdup in libsmbclient test X-Git-Tag: tevent-0.9.34~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b012f1589b3e0cb482e14ca76b5d150792d30643;p=thirdparty%2Fsamba.git s4:torture: Avoid useless strdup in libsmbclient test BUG: https://bugzilla.samba.org/show_bug.cgi?id=13101 Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- 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;