From: Volker Lendecke Date: Fri, 5 Nov 2004 21:45:02 +0000 (+0000) Subject: r3559: If called interactively, on shutdown dump the talloc contexts left. Idea X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~5638 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b111bb46afc247e034a11e953b9d243cde69cc07;p=thirdparty%2Fsamba.git r3559: If called interactively, on shutdown dump the talloc contexts left. Idea stolen from samba4 ... ;-) Volker --- diff --git a/source/smbd/server.c b/source/smbd/server.c index 0fe633bb969..bf1da1a0c87 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -910,6 +910,15 @@ void build_options(BOOL screen); 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); }