summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c9
-rw-r--r--source3/libsmb/clientgen.c12
2 files changed, 1 insertions, 20 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 8c74d2e6cc..c5432973d3 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2699,15 +2699,6 @@ static void cli_negprot_done(struct tevent_req *subreq)
cli_set_signing_negotiated(cli);
}
- if (cli->capabilities & (CAP_LARGE_READX|CAP_LARGE_WRITEX)) {
- SAFE_FREE(cli->inbuf);
- cli->inbuf = (char *)SMB_MALLOC(CLI_SAMBA_MAX_LARGE_READX_SIZE+LARGE_WRITEX_HDR_SIZE+SAFETY_MARGIN);
- if (tevent_req_nomem(cli->inbuf, req)) {
- return;
- }
- cli->bufsize = CLI_SAMBA_MAX_LARGE_READX_SIZE + LARGE_WRITEX_HDR_SIZE;
- }
-
} else if (cli->protocol >= PROTOCOL_LANMAN1) {
cli->use_spnego = False;
cli->sec_mode = SVAL(vwv + 1, 0);
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);