summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-04-07 15:08:13 -0700
committerRalph Boehme <slow@samba.org>2017-04-08 12:30:08 +0200
commit7c017234ab486859829aeaab2ce728956db30b60 (patch)
tree00d81107659151b9e797925964799e6ff6df9632 /source4/smbd
parenta9bd9a143e6f76dcef011399433b7b779f1ed2e5 (diff)
downloadsamba-7c017234ab486859829aeaab2ce728956db30b60.tar.gz
s4: process_standard: Move talloc_free of event context so it is last thing freed before exit().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/process_standard.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index ca93f93ce55..f786d4dcc22 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -388,12 +388,13 @@ _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);
+ /* Always free event context last before exit. */
+ talloc_free(ev);
+
/* terminate this process */
exit(0);
}