From f69135e0e985200d62d4618b742bd642ecfdbf31 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 13 Feb 2010 23:09:59 +1100 Subject: [PATCH] s4-smbd: fix crash in notify code on client termination We need to free the lp_ctx after we free the event context, otherwise the teardown code in the notify backend dies when it tries to use the iconv_convenience ptr Fixes bug 7053 --- source4/smbd/process_standard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index 145cbc0a2bf..dfa4fa6b1c7 100644 --- a/source4/smbd/process_standard.c +++ b/source4/smbd/process_standard.c @@ -225,12 +225,12 @@ _NORETURN_ static void standard_terminate(struct tevent_context *ev, struct load { DEBUG(2,("standard_terminate: reason[%s]\n",reason)); + talloc_free(ev); + /* this reload_charcnv() has the effect of freeing the iconv context memory, which makes leak checking easier */ reload_charcnv(lp_ctx); - talloc_free(ev); - /* terminate this process */ exit(0); } -- 2.11.4.GIT