From b111bb46afc247e034a11e953b9d243cde69cc07 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 5 Nov 2004 21:45:02 +0000 Subject: [PATCH] r3559: If called interactively, on shutdown dump the talloc contexts left. Idea stolen from samba4 ... ;-) Volker --- source/smbd/server.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } -- 2.47.3