s4: Add TALLOC_CTX * to register_server_service().
[garming/samba-autobuild/.git] / source4 / smbd / service.c
index 81ad3c5aabca45d196f7fccdfff7f7715c572dc1..403ae74964b5d6693fa060755d08e3bbf6c82efc 100644 (file)
@@ -36,11 +36,12 @@ static struct registered_server {
 /*
   register a server service. 
 */
-NTSTATUS register_server_service(const char *name,
-                                void (*task_init)(struct task_server *))
+NTSTATUS register_server_service(TALLOC_CTX *ctx,
+                               const char *name,
+                               void (*task_init)(struct task_server *))
 {
        struct registered_server *srv;
-       srv = talloc(talloc_autofree_context(), struct registered_server);
+       srv = talloc(ctx, struct registered_server);
        NT_STATUS_HAVE_NO_MEMORY(srv);
        srv->service_name = name;
        srv->task_init = task_init;