cli->session->vuid = setup.generic.out.vuid;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
cli->tree->tid = tcon.tconx.out.cnum;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
tree->reference_count++;
done:
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
transport->event.ctx = event_context_init();
if (transport->event.ctx == NULL) {
- talloc_destroy(transport);
+ talloc_free(transport);
return NULL;
}
status = smb_raw_session_setup(session, mem_ctx, &setup);
if (!NT_STATUS_IS_OK(status)) {
smbcli_session_close(session);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
tree = smbcli_tree_init(session);
if (!tree) {
smbcli_session_close(session);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
}
if (!NT_STATUS_IS_OK(status)) {
smbcli_tree_close(tree);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
tree->fs_type = talloc_strdup(tree, tcon.tconx.out.fs_type);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
*ret_tree = tree;
return NT_STATUS_OK;
/* free a ndr_push structure */
void ndr_push_free(struct ndr_push *ndr)
{
- talloc_destroy(ndr);
+ talloc_free(ndr);
}
}
status = smb_raw_open(tree, mem_ctx, &io);
free(name);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (!NT_STATUS_IS_OK(status)) {
return status;
/* work out if we are going to keep the search state */
if ((io->t2ffirst.in.flags & FLAG_TRANS2_FIND_CLOSE) ||
((io->t2ffirst.in.flags & FLAG_TRANS2_FIND_CLOSE_IF_END) && (i == dir->count))) {
- talloc_destroy(search->mem_ctx);
+ talloc_free(search->mem_ctx);
} else {
private->next_search_handle++;
DLIST_ADD(private->search, search);
if ((io->t2fnext.in.flags & FLAG_TRANS2_FIND_CLOSE) ||
((io->t2fnext.in.flags & FLAG_TRANS2_FIND_CLOSE_IF_END) && (i == dir->count))) {
DLIST_REMOVE(private->search, search);
- talloc_destroy(search->mem_ctx);
+ talloc_free(search->mem_ctx);
}
return NT_STATUS_OK;
}
DLIST_REMOVE(private->search, search);
- talloc_destroy(search->mem_ctx);
+ talloc_free(search->mem_ctx);
return NT_STATUS_OK;
}
{
if (!lp_talloc)
return;
- talloc_destroy(lp_talloc);
+ talloc_free(lp_talloc);
lp_talloc = NULL;
}
*p = talloc_p(mem_ctx, struct dcesrv_connection);
if (! *p) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
}
free_session_info(&p->auth_state.session_info);
}
- talloc_destroy(p->mem_ctx);
+ talloc_free(p->mem_ctx);
}
static void dcesrv_init_hdr(struct dcerpc_packet *pkt)
return dcesrv_fault(call, DCERPC_FAULT_OTHER);
}
- talloc_destroy(call->mem_ctx);
+ talloc_free(call->mem_ctx);
/* we don't send a reply to a auth3 request, except by a
fault */
call = talloc_p(mem_ctx, struct dcesrv_call_state);
if (!call) {
talloc_free(dce_conn->partial_input.data);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
}
call->mem_ctx = mem_ctx;
ndr = ndr_pull_init_blob(&blob, mem_ctx);
if (!ndr) {
talloc_free(dce_conn->partial_input.data);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
}
status = ndr_pull_dcerpc_packet(ndr, NDR_SCALARS|NDR_BUFFERS, &call->pkt);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(dce_conn->partial_input.data);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
it to the list of pending calls. We add it to the end to keep the call
list in the order we will answer */
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
return status;
if (call->replies == NULL) {
/* we're done with the whole call */
DLIST_REMOVE(dce_conn->call_list, call);
- talloc_destroy(call->mem_ctx);
+ talloc_free(call->mem_ctx);
}
return status;
}
state = talloc_p(mem_ctx, struct server_pipe_state);
if (state == NULL) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
}
ZERO_STRUCTP(state);
state->authenticated = True;
if (dce_call->conn->auth_state.session_info == NULL) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
smb_panic("No session info provided by schannel level setup!");
return NT_STATUS_NO_USER_SESSION_KEY;
}
if (!NT_STATUS_IS_OK(status)) {
DEBUG(3, ("getting schannel credentials failed with %s\n", nt_errstr(status)));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
struct server_pipe_state *pipe_state = conn->private;
if (pipe_state) {
- talloc_destroy(pipe_state->mem_ctx);
+ talloc_free(pipe_state->mem_ctx);
}
conn->private = NULL;
/* destroyed on pipe shutdown */
if (pipe_state) {
- talloc_destroy(pipe_state->mem_ctx);
+ talloc_free(pipe_state->mem_ctx);
dce_call->conn->private = NULL;
}
pipe_state = talloc_p(pipe_mem_ctx, struct server_pipe_state);
if (!pipe_state) {
- talloc_destroy(pipe_mem_ctx);
+ talloc_free(pipe_mem_ctx);
return NT_STATUS_NO_MEMORY;
}
/* make sure the sam database is accessible */
c_state->sam_ctx = samdb_connect(mem_ctx);
if (c_state->sam_ctx == NULL) {
- talloc_destroy(c_state);
+ talloc_free(c_state);
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
ifip = interpret_addr2(mem_ctx, lp_socket_address());
add_socket(service, model_ops, NULL, ifip);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
}
conn_close_all(smb_conn);
- talloc_destroy(smb_conn->mem_ctx);
+ talloc_free(smb_conn->mem_ctx);
return;
}