diff options
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r-- | source4/libcli/raw/clisession.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/clisocket.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/clitransport.c | 8 | ||||
-rw-r--r-- | source4/libcli/raw/clitree.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/raweas.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/rawfile.c | 6 | ||||
-rw-r--r-- | source4/libcli/raw/rawfileinfo.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/rawreadwrite.c | 4 | ||||
-rw-r--r-- | source4/libcli/raw/rawrequest.c | 4 | ||||
-rw-r--r-- | source4/libcli/raw/rawtrans.c | 4 |
10 files changed, 18 insertions, 18 deletions
diff --git a/source4/libcli/raw/clisession.c b/source4/libcli/raw/clisession.c index f46c238378..0ee631a549 100644 --- a/source4/libcli/raw/clisession.c +++ b/source4/libcli/raw/clisession.c @@ -69,7 +69,7 @@ void smbcli_session_close(struct smbcli_session *session) ****************************************************************************/ struct smbcli_request *smb_raw_session_setup_send(struct smbcli_session *session, union smb_sesssetup *parms) { - struct smbcli_request *req; + struct smbcli_request *req = NULL; switch (parms->generic.level) { case RAW_SESSSETUP_GENERIC: diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c index 343904999a..2bb50d200f 100644 --- a/source4/libcli/raw/clisocket.c +++ b/source4/libcli/raw/clisocket.c @@ -181,7 +181,7 @@ BOOL smbcli_sock_connect_byname(struct smbcli_socket *sock, const char *host, in ret = smbcli_sock_connect(sock, &ip, port); if (ret) { - sock->hostname = talloc_steal(mem_ctx, sock->mem_ctx, name); + sock->hostname = talloc_steal(sock->mem_ctx, name); } talloc_destroy(mem_ctx); diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 91f0f0f8f5..82939467ae 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -296,7 +296,7 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport) { uint8_t *buffer, *hdr, *vwv; int len; - uint16_t wct, mid = 0; + uint16_t wct=0, mid = 0; struct smbcli_request *req; buffer = transport->recv_buffer.buffer; @@ -309,7 +309,7 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport) /* see if it could be an oplock break request */ if (handle_oplock_break(transport, len, hdr, vwv)) { - talloc_free(transport->mem_ctx, buffer); + talloc_free(buffer); return; } @@ -325,7 +325,7 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport) if (!req) goto error; req->in.buffer = buffer; - talloc_steal(transport->mem_ctx, req->mem_ctx, buffer); + talloc_steal(req->mem_ctx, buffer); req->in.size = len; req->in.allocated = req->in.size; goto async; @@ -349,7 +349,7 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport) /* fill in the 'in' portion of the matching request */ req->in.buffer = buffer; - talloc_steal(transport->mem_ctx, req->mem_ctx, buffer); + talloc_steal(req->mem_ctx, buffer); req->in.size = len; req->in.allocated = req->in.size; diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c index 97c0910451..57e322da32 100644 --- a/source4/libcli/raw/clitree.c +++ b/source4/libcli/raw/clitree.c @@ -70,7 +70,7 @@ void smbcli_tree_close(struct smbcli_tree *tree) ****************************************************************************/ struct smbcli_request *smb_tree_connect_send(struct smbcli_tree *tree, union smb_tcon *parms) { - struct smbcli_request *req; + struct smbcli_request *req = NULL; switch (parms->tcon.level) { case RAW_TCON_TCON: diff --git a/source4/libcli/raw/raweas.c b/source4/libcli/raw/raweas.c index e07fbcd288..d78f10fe1a 100644 --- a/source4/libcli/raw/raweas.c +++ b/source4/libcli/raw/raweas.c @@ -128,7 +128,7 @@ NTSTATUS ea_pull_list(const DATA_BLOB *blob, blob2.data = blob->data + ofs; blob2.length = ea_size - ofs; - *eas = talloc_realloc(mem_ctx, *eas, sizeof(**eas) * (n+1)); + *eas = talloc_realloc(*eas, sizeof(**eas) * (n+1)); if (! *eas) return NT_STATUS_NO_MEMORY; len = ea_pull_struct(&blob2, mem_ctx, &(*eas)[n]); diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c index 8bd8e5d8af..1b858d489a 100644 --- a/source4/libcli/raw/rawfile.c +++ b/source4/libcli/raw/rawfile.c @@ -34,7 +34,7 @@ struct smbcli_request *smb_raw_rename_send(struct smbcli_tree *tree, union smb_rename *parms) { - struct smbcli_request *req; + struct smbcli_request *req = NULL; switch (parms->generic.level) { case RAW_RENAME_RENAME: @@ -490,7 +490,7 @@ NTSTATUS smb_raw_open(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_o ****************************************************************************/ struct smbcli_request *smb_raw_close_send(struct smbcli_tree *tree, union smb_close *parms) { - struct smbcli_request *req; + struct smbcli_request *req = NULL; switch (parms->generic.level) { case RAW_CLOSE_GENERIC: @@ -536,7 +536,7 @@ NTSTATUS smb_raw_close(struct smbcli_tree *tree, union smb_close *parms) ****************************************************************************/ struct smbcli_request *smb_raw_lock_send(struct smbcli_tree *tree, union smb_lock *parms) { - struct smbcli_request *req; + struct smbcli_request *req = NULL; switch (parms->generic.level) { case RAW_LOCK_GENERIC: diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c index 9b82bf6fa0..aac8f2657b 100644 --- a/source4/libcli/raw/rawfileinfo.c +++ b/source4/libcli/raw/rawfileinfo.c @@ -174,7 +174,7 @@ static NTSTATUS smb_raw_info_backend(struct smbcli_session *session, while (blob->length - ofs >= 24) { uint_t n = parms->stream_info.out.num_streams; parms->stream_info.out.streams = - talloc_realloc(mem_ctx,parms->stream_info.out.streams, + talloc_realloc(parms->stream_info.out.streams, (n+1) * sizeof(parms->stream_info.out.streams[0])); if (!parms->stream_info.out.streams) { return NT_STATUS_NO_MEMORY; diff --git a/source4/libcli/raw/rawreadwrite.c b/source4/libcli/raw/rawreadwrite.c index f0a9a063ed..dbca6fb7a5 100644 --- a/source4/libcli/raw/rawreadwrite.c +++ b/source4/libcli/raw/rawreadwrite.c @@ -33,7 +33,7 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_read *parms) { BOOL bigoffset = False; - struct smbcli_request *req; + struct smbcli_request *req = NULL; switch (parms->generic.level) { case RAW_READ_GENERIC: @@ -185,7 +185,7 @@ NTSTATUS smb_raw_read(struct smbcli_tree *tree, union smb_read *parms) struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_write *parms) { BOOL bigoffset = False; - struct smbcli_request *req; + struct smbcli_request *req = NULL; switch (parms->generic.level) { case RAW_WRITE_GENERIC: diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c index bc87af4297..20a389af4c 100644 --- a/source4/libcli/raw/rawrequest.c +++ b/source4/libcli/raw/rawrequest.c @@ -224,7 +224,7 @@ static void smbcli_req_grow_allocation(struct smbcli_request *req, uint_t new_si /* we need to realloc */ req->out.allocated = req->out.size + delta + REQ_OVER_ALLOCATION; - buf2 = talloc_realloc(req->mem_ctx, req->out.buffer, req->out.allocated); + buf2 = talloc_realloc(req->out.buffer, req->out.allocated); if (buf2 == NULL) { smb_panic("out of memory in req_grow_allocation"); } @@ -915,7 +915,7 @@ size_t smbcli_blob_append_string(struct smbcli_session *session, max_len = (strlen(str)+2) * MAX_BYTES_PER_CHAR; - blob->data = talloc_realloc(mem_ctx, blob->data, blob->length + max_len); + blob->data = talloc_realloc(blob->data, blob->length + max_len); if (!blob->data) { return 0; } diff --git a/source4/libcli/raw/rawtrans.c b/source4/libcli/raw/rawtrans.c index 53f8075822..49b43dd930 100644 --- a/source4/libcli/raw/rawtrans.c +++ b/source4/libcli/raw/rawtrans.c @@ -84,7 +84,7 @@ NTSTATUS smb_raw_trans2_recv(struct smbcli_request *req, /* allocate it */ if (total_data != 0) { - tdata = talloc_realloc(mem_ctx, parms->out.data.data,total_data); + tdata = talloc_realloc(parms->out.data.data,total_data); if (!tdata) { DEBUG(0,("smb_raw_receive_trans: failed to enlarge data buffer to %d bytes\n", total_data)); req->status = NT_STATUS_NO_MEMORY; @@ -94,7 +94,7 @@ NTSTATUS smb_raw_trans2_recv(struct smbcli_request *req, } if (total_param != 0) { - tparam = talloc_realloc(mem_ctx, parms->out.params.data,total_param); + tparam = talloc_realloc(parms->out.params.data,total_param); if (!tparam) { DEBUG(0,("smb_raw_receive_trans: failed to enlarge param buffer to %d bytes\n", total_param)); req->status = NT_STATUS_NO_MEMORY; |