summaryrefslogtreecommitdiff
path: root/source3/rpc_server/rpc_ncacn_np.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-07-27 16:40:21 -0400
committerSimo Sorce <idra@samba.org>2011-07-28 17:41:08 +0200
commite84c7a2e26d206f38bcb94d4d1b6c854cdd4094c (patch)
tree7b03f7c0070c9f16aa8fcd2ae2ddb53e65f5e76d /source3/rpc_server/rpc_ncacn_np.c
parent48a71664f21f50616749b467e6f082b6c20036a1 (diff)
downloadsamba-e84c7a2e26d206f38bcb94d4d1b6c854cdd4094c.tar.gz
samba-e84c7a2e26d206f38bcb94d4d1b6c854cdd4094c.tar.bz2
samba-e84c7a2e26d206f38bcb94d4d1b6c854cdd4094c.zip
s3-rpc_server: Use talloc for pipe_rpc_fns
Everything uses talloc in the rpc server nowadays, remove this ancient use of malloc. This also allows us to remove the free fucntion and let talloc handle it properly. Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Thu Jul 28 17:41:08 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server/rpc_ncacn_np.c')
-rw-r--r--source3/rpc_server/rpc_ncacn_np.c7
1 files changed, 4 insertions, 3 deletions
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;