diff options
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 6 | ||||
-rw-r--r-- | source3/rpc_server/srv_srvsvc_nt.c | 5 |
3 files changed, 7 insertions, 8 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 7493aaddb9..fefdb529b2 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -2240,9 +2240,9 @@ BOOL api_pipe_request(pipes_struct *p) pipe_fns = find_pipe_fns_by_context(p->contexts, p->hdr_req.context_id); if ( pipe_fns ) { - set_current_rpc_talloc(p->mem_ctx); + TALLOC_CTX *frame = talloc_stackframe(); ret = api_rpcTNP(p, p->name, pipe_fns->cmds, pipe_fns->n_cmds); - set_current_rpc_talloc(NULL); + TALLOC_FREE(frame); } else { DEBUG(0,("api_pipe_request: No rpc function table associated with context [%d] on pipe [%s]\n", diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index b50e1e7558..600eb2f688 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -389,7 +389,7 @@ static BOOL get_printer_snum(pipes_struct *p, POLICY_HND *hnd, int *number, DEBUG(4,("short name:%s\n", Printer->sharename)); *number = print_queue_snum(Printer->sharename); if ((*number != -1) && (params != NULL)) { - *params = get_share_params(tmp_talloc_ctx(), + *params = get_share_params(talloc_tos(), Printer->sharename); if (*params == NULL) { return False; @@ -4257,7 +4257,7 @@ static BOOL construct_printer_info_2(Printer_entry *print_hnd, /* don't use talloc_steal() here unless you do a deep steal of all the SEC_DESC members */ - printer->secdesc = dup_sec_desc( get_talloc_ctx(), + printer->secdesc = dup_sec_desc( talloc_tos(), ntprinter->info_2->secdesc_buf->sd ); } @@ -4297,7 +4297,7 @@ static BOOL construct_printer_info_3(Printer_entry *print_hnd, /* don't use talloc_steal() here unless you do a deep steal of all the SEC_DESC members */ - printer->secdesc = dup_sec_desc( get_talloc_ctx(), + printer->secdesc = dup_sec_desc( talloc_tos(), ntprinter->info_2->secdesc_buf->sd ); } diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index ed32f6a765..22eaac51a7 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -1049,7 +1049,6 @@ static WERROR init_srv_conn_info_ctr(pipes_struct *p, union srvsvc_NetConnCtr *c static WERROR net_file_enum_3(pipes_struct *p, union srvsvc_NetFileCtr *ctr, uint32 *resume_hnd, uint32 *num_entries ) { - TALLOC_CTX *ctx = get_talloc_ctx(); WERROR status; /* TODO -- Windows enumerates @@ -1058,11 +1057,11 @@ static WERROR net_file_enum_3(pipes_struct *p, union srvsvc_NetFileCtr *ctr, uin ctr->ctr3 = TALLOC_ZERO_P(p->mem_ctx, struct srvsvc_NetFileCtr3); - status = net_enum_files( ctx, &ctr->ctr3->array, num_entries, resume_hnd ); + status = net_enum_files(p->mem_ctx, &ctr->ctr3->array, num_entries, resume_hnd ); if ( !W_ERROR_IS_OK(status)) return status; - status = net_enum_pipes( ctx, &ctr->ctr3->array, num_entries, resume_hnd ); + status = net_enum_pipes(p->mem_ctx, &ctr->ctr3->array, num_entries, resume_hnd ); if ( !W_ERROR_IS_OK(status)) return status; |