svn commit: samba r3560 - in trunk/source/smbd: .

vlendec at samba.org vlendec at samba.org
Fri Nov 5 21:45:36 GMT 2004


Author: vlendec
Date: 2004-11-05 21:45:35 +0000 (Fri, 05 Nov 2004)
New Revision: 3560

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3560

Log:
If called interactively, on shutdown dump the talloc contexts left. Idea
stolen from samba4 ... ;-)

Volker

Modified:
   trunk/source/smbd/server.c


Changeset:
Modified: trunk/source/smbd/server.c
===================================================================
--- trunk/source/smbd/server.c	2004-11-05 21:45:02 UTC (rev 3559)
+++ trunk/source/smbd/server.c	2004-11-05 21:45:35 UTC (rev 3560)
@@ -915,6 +915,15 @@
 	smbd_process();
 	
 	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);
 }



More information about the samba-cvs mailing list