summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_pipe_hnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server/srv_pipe_hnd.c')
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 562b55b8f7..8720a4df68 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -204,8 +204,7 @@ smb_np_struct *open_rpc_pipe_p(char *pipe_name,
for (p = Pipes; p; p = p->next)
DEBUG(5,("open_rpc_pipe_p: name %s pnum=%x\n", p->name, p->pnum));
- p = (smb_np_struct *)malloc(sizeof(*p));
-
+ p = SMB_MALLOC_P(smb_np_struct);
if (!p) {
DEBUG(0,("ERROR! no memory for pipes_struct!\n"));
return NULL;
@@ -283,10 +282,9 @@ static void *make_internal_rpc_pipe_p(char *pipe_name,
return NULL;
}
- p = (pipes_struct *)malloc(sizeof(*p));
+ p = SMB_MALLOC_P(pipes_struct);
- if (!p)
- {
+ if (!p) {
DEBUG(0,("ERROR! no memory for pipes_struct!\n"));
return NULL;
}