diff options
Diffstat (limited to 'source4/ntvfs/ipc')
-rw-r--r-- | source4/ntvfs/ipc/ipc_rap.c | 10 | ||||
-rw-r--r-- | source4/ntvfs/ipc/rap_server.c | 6 | ||||
-rw-r--r-- | source4/ntvfs/ipc/vfs_ipc.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/source4/ntvfs/ipc/ipc_rap.c b/source4/ntvfs/ipc/ipc_rap.c index 347ff39d97..32b2fa2181 100644 --- a/source4/ntvfs/ipc/ipc_rap.c +++ b/source4/ntvfs/ipc/ipc_rap.c @@ -395,7 +395,7 @@ NTSTATUS ipc_rap_call(struct smbsrv_request *req, struct smb_trans2 *trans) struct ndr_push *final_param; struct ndr_push *final_data; - call = new_rap_srv_call(req->mem_ctx, trans); + call = new_rap_srv_call(req, trans); if (call == NULL) return NT_STATUS_NO_MEMORY; @@ -406,8 +406,8 @@ NTSTATUS ipc_rap_call(struct smbsrv_request *req, struct smb_trans2 *trans) NDR_CHECK(ndr_pull_string(call->ndr_pull_param, NDR_SCALARS, &call->datadesc)); - call->ndr_push_param = ndr_push_init_ctx(req->mem_ctx); - call->ndr_push_data = ndr_push_init_ctx(req->mem_ctx); + call->ndr_push_param = ndr_push_init_ctx(req); + call->ndr_push_data = ndr_push_init_ctx(req); if ((call->ndr_push_param == NULL) || (call->ndr_push_data == NULL)) return NT_STATUS_NO_MEMORY; @@ -432,8 +432,8 @@ NTSTATUS ipc_rap_call(struct smbsrv_request *req, struct smb_trans2 *trans) result_param = ndr_push_blob(call->ndr_push_param); result_data = ndr_push_blob(call->ndr_push_data); - final_param = ndr_push_init_ctx(req->mem_ctx); - final_data = ndr_push_init_ctx(req->mem_ctx); + final_param = ndr_push_init_ctx(req); + final_data = ndr_push_init_ctx(req); if ((final_param == NULL) || (final_data == NULL)) return NT_STATUS_NO_MEMORY; diff --git a/source4/ntvfs/ipc/rap_server.c b/source4/ntvfs/ipc/rap_server.c index 4a7b2dd91b..4ab1915c81 100644 --- a/source4/ntvfs/ipc/rap_server.c +++ b/source4/ntvfs/ipc/rap_server.c @@ -29,18 +29,18 @@ NTSTATUS rap_netshareenum(struct smbsrv_request *req, { r->out.status = 0; r->out.available = 2; - r->out.info = talloc_array_p(req->mem_ctx, + r->out.info = talloc_array_p(req, union rap_shareenum_info, 2); strncpy(r->out.info[0].info1.name, "C$", 12); r->out.info[0].info1.pad = 0; r->out.info[0].info1.type = 0; - r->out.info[0].info1.comment = talloc_strdup(req->mem_ctx, "Bla"); + r->out.info[0].info1.comment = talloc_strdup(req, "Bla"); strncpy(r->out.info[1].info1.name, "IPC$", 12); r->out.info[1].info1.pad = 0; r->out.info[1].info1.type = 1; - r->out.info[1].info1.comment = talloc_strdup(req->mem_ctx, "Blub"); + r->out.info[1].info1.comment = talloc_strdup(req, "Blub"); return NT_STATUS_OK; } diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index 2e44b00c6b..053222460c 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -110,11 +110,11 @@ static NTSTATUS ipc_connect(struct smbsrv_request *req, const char *sharename) struct smbsrv_tcon *tcon = req->tcon; struct ipc_private *private; - tcon->fs_type = talloc_strdup(tcon->mem_ctx, "IPC"); - tcon->dev_type = talloc_strdup(tcon->mem_ctx, "IPC"); + tcon->fs_type = talloc_strdup(tcon, "IPC"); + tcon->dev_type = talloc_strdup(tcon, "IPC"); /* prepare the private state for this connection */ - private = talloc(tcon->mem_ctx, sizeof(struct ipc_private)); + private = talloc_p(tcon, struct ipc_private); if (!private) { return NT_STATUS_NO_MEMORY; } @@ -604,7 +604,7 @@ static NTSTATUS ipc_dcerpc_cmd(struct smbsrv_request *req, struct smb_trans2 *tr return NT_STATUS_INVALID_HANDLE; } - trans->out.data = data_blob_talloc(req->mem_ctx, NULL, trans->in.max_data); + trans->out.data = data_blob_talloc(req, NULL, trans->in.max_data); if (!trans->out.data.data) { return NT_STATUS_NO_MEMORY; } |