diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/rpc_handles.c | 16 | ||||
-rw-r--r-- | source3/rpc_server/rpc_ncacn_np.c | 7 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 6 |
3 files changed, 7 insertions, 22 deletions
diff --git a/source3/rpc_server/rpc_handles.c b/source3/rpc_server/rpc_handles.c index 19e7655221..87145ca848 100644 --- a/source3/rpc_server/rpc_handles.c +++ b/source3/rpc_server/rpc_handles.c @@ -107,20 +107,6 @@ bool check_open_pipes(void) Close an rpc pipe. ****************************************************************************/ -static void free_pipe_rpc_context_internal(struct pipe_rpc_fns *list) -{ - struct pipe_rpc_fns *tmp = list; - struct pipe_rpc_fns *tmp2; - - while (tmp) { - tmp2 = tmp->next; - SAFE_FREE(tmp); - tmp = tmp2; - } - - return; -} - int close_internal_rpc_pipe_hnd(struct pipes_struct *p) { if (!p) { @@ -131,8 +117,6 @@ int close_internal_rpc_pipe_hnd(struct pipes_struct *p) /* Free the handles database. */ close_policy_by_pipe(p); - free_pipe_rpc_context_internal(p->contexts); - DLIST_REMOVE(InternalPipes, p); return 0; diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c index 2ed4a01704..1080a98eb4 100644 --- a/source3/rpc_server/rpc_ncacn_np.c +++ b/source3/rpc_server/rpc_ncacn_np.c @@ -80,10 +80,11 @@ struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx, return NULL; } - context_fns = SMB_MALLOC_P(struct pipe_rpc_fns); + context_fns = talloc(p, struct pipe_rpc_fns); if (context_fns == NULL) { - DEBUG(0,("malloc() failed!\n")); - return False; + DEBUG(0,("talloc() failed!\n")); + TALLOC_FREE(p); + return NULL; } context_fns->next = context_fns->prev = NULL; diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 233dfdf5b2..058f1b8b14 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -356,10 +356,10 @@ static bool check_bind_req(struct pipes_struct *p, return false; } - context_fns = SMB_MALLOC_P(struct pipe_rpc_fns); + context_fns = talloc(p, struct pipe_rpc_fns); if (context_fns == NULL) { - DEBUG(0,("check_bind_req: malloc() failed!\n")); - return False; + DEBUG(0,("check_bind_req: talloc() failed!\n")); + return false; } context_fns->next = context_fns->prev = NULL; |