Move talloc_enable_null_tracking() to the s3 daemons
[ira/wip.git] / source3 / nmbd / nmbd.c
index 5678c8e848cf9cc37acfc6dc9a4c494acd031ae0..fcbe50842d0cfcfc56e008b4b6972734da8b7152 100644 (file)
@@ -780,9 +780,15 @@ static bool open_sockets(bool isdaemon, int port)
        POPT_COMMON_SAMBA
        { NULL }
        };
-       TALLOC_CTX *frame = talloc_stackframe(); /* Setup tos. */
+       TALLOC_CTX *frame;
        NTSTATUS status;
 
+       /*
+        * Do this before any other talloc operation
+        */
+       talloc_enable_null_tracking();
+       frame = talloc_stackframe();
+
        load_case_tables();
 
        global_nmb_port = NMB_PORT;