r6595: This is Volkers new-talloc patch. Just got the go-ahead from
[samba.git] / source3 / smbd / server.c
index 9d910cd14adf1ff02ea9d8fdd379708f3b6d1e7b..301534d750cf20de5333773fd3cde5261ba3ea79 100644 (file)
@@ -747,6 +747,10 @@ void build_options(BOOL screen);
                log_stdout = True;
        }
 
+       if (interactive && (DEBUGLEVEL >= 9)) {
+               talloc_enable_leak_report();
+       }
+
        if (log_stdout && Fork) {
                DEBUG(0,("ERROR: Can't log to stdout (-S) unless daemon is in foreground (-F) or interactive (-i)\n"));
                exit(1);
@@ -952,14 +956,6 @@ void build_options(BOOL screen);
        
        namecache_shutdown();
 
-       if (interactive) {
-               TALLOC_CTX *mem_ctx = talloc_init("end_description");
-               char *description = talloc_describe_all(mem_ctx);
-
-               DEBUG(3, ("tallocs left:\n%s\n", description));
-               talloc_destroy(mem_ctx);
-       }
-
        exit_server("normal exit");
        return(0);
 }