diff options
author | Jeremy Allison <jra@samba.org> | 2017-04-07 15:08:13 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2017-04-08 12:30:08 +0200 |
commit | 7c017234ab486859829aeaab2ce728956db30b60 (patch) | |
tree | 00d81107659151b9e797925964799e6ff6df9632 /source4/smbd | |
parent | a9bd9a143e6f76dcef011399433b7b779f1ed2e5 (diff) | |
download | samba-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.c | 5 |
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); } |