summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/service_named_pipe.c8
-rw-r--r--source4/smbd/service_stream.c5
2 files changed, 8 insertions, 5 deletions
diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c
index f420e2bacb..25d37af8c4 100644
--- a/source4/smbd/service_named_pipe.c
+++ b/source4/smbd/service_named_pipe.c
@@ -289,7 +289,8 @@ static const struct stream_server_ops named_pipe_stream_ops = {
.send_handler = named_pipe_send,
};
-NTSTATUS tstream_setup_named_pipe(struct tevent_context *event_context,
+NTSTATUS tstream_setup_named_pipe(TALLOC_CTX *mem_ctx,
+ struct tevent_context *event_context,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops,
const struct stream_server_ops *stream_ops,
@@ -300,7 +301,7 @@ NTSTATUS tstream_setup_named_pipe(struct tevent_context *event_context,
struct named_pipe_socket *pipe_sock;
NTSTATUS status = NT_STATUS_NO_MEMORY;;
- pipe_sock = talloc(event_context, struct named_pipe_socket);
+ pipe_sock = talloc(mem_ctx, struct named_pipe_socket);
if (pipe_sock == NULL) {
goto fail;
}
@@ -338,7 +339,8 @@ NTSTATUS tstream_setup_named_pipe(struct tevent_context *event_context,
pipe_sock->ops = stream_ops;
pipe_sock->private_data = private_data;
- status = stream_setup_socket(event_context,
+ status = stream_setup_socket(pipe_sock,
+ event_context,
lp_ctx,
model_ops,
&named_pipe_stream_ops,
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c
index 85efa34339..916393253b 100644
--- a/source4/smbd/service_stream.c
+++ b/source4/smbd/service_stream.c
@@ -255,7 +255,8 @@ static void stream_accept_handler(struct tevent_context *ev, struct tevent_fd *f
a string for the port. Should leave allocating a port nr
to the socket implementation - JRV20070903
*/
-NTSTATUS stream_setup_socket(struct tevent_context *event_context,
+NTSTATUS stream_setup_socket(TALLOC_CTX *mem_ctx,
+ struct tevent_context *event_context,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops,
const struct stream_server_ops *stream_ops,
@@ -271,7 +272,7 @@ NTSTATUS stream_setup_socket(struct tevent_context *event_context,
struct tevent_fd *fde;
int i;
- stream_socket = talloc_zero(event_context, struct stream_socket);
+ stream_socket = talloc_zero(mem_ctx, struct stream_socket);
NT_STATUS_HAVE_NO_MEMORY(stream_socket);
status = socket_create(family, SOCKET_TYPE_STREAM, &stream_socket->sock, 0);