Move talloc_enable_null_tracking() to the s3 daemons
[idra/samba.git] / source3 / smbd / server.c
index 07261b1e83179ee4bc5cb87ffc04e69f9fbd3f92..106eafcccd780a0ff317c19299809c0287e163fb 100644 (file)
@@ -857,11 +857,17 @@ extern void build_options(bool screen);
        POPT_TABLEEND
        };
        struct smbd_parent_context *parent = NULL;
-       TALLOC_CTX *frame = talloc_stackframe(); /* Setup tos. */
+       TALLOC_CTX *frame;
        NTSTATUS status;
        uint64_t unique_id;
        struct rpc_srv_callbacks spoolss_cb;
 
+       /*
+        * Do this before any other talloc operation
+        */
+       talloc_enable_null_tracking();
+       frame = talloc_stackframe();
+
        /* Initialize the event context, it will panic on error */
        smbd_event_context();