summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index e874a8983c..2380ceb32c 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -200,9 +200,7 @@ struct cli_state *cli_initialise_ex(int signing_state)
cli->vuid = UID_FIELD_INVALID;
cli->protocol = PROTOCOL_NT1;
cli->timeout = 20000; /* Timeout is in milliseconds. */
- cli->bufsize = CLI_BUFFER_SIZE+4;
- cli->max_xmit = cli->bufsize;
- cli->inbuf = (char *)SMB_MALLOC(cli->bufsize+SAFETY_MARGIN);
+ cli->max_xmit = CLI_BUFFER_SIZE+4;
cli->oplock_handler = cli_oplock_ack;
cli->case_sensitive = false;
@@ -237,11 +235,6 @@ struct cli_state *cli_initialise_ex(int signing_state)
mandatory_signing = true;
}
- if (!cli->inbuf)
- goto error;
-
- memset(cli->inbuf, 0, cli->bufsize);
-
/* initialise signing */
cli->signing_state = smb_signing_init(cli,
allow_smb_signing,
@@ -264,7 +257,6 @@ struct cli_state *cli_initialise_ex(int signing_state)
error:
- SAFE_FREE(cli->inbuf);
TALLOC_FREE(cli);
return NULL;
}
@@ -308,8 +300,6 @@ static void _cli_shutdown(struct cli_state *cli)
cli_tdis(cli);
}
- SAFE_FREE(cli->inbuf);
-
data_blob_free(&cli->secblob);
data_blob_free(&cli->user_session_key);