summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/server_exit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c
index 18a1a465df..c656908969 100644
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -99,13 +99,11 @@ static void exit_server_common(enum server_exit_reason how,
change_to_root_user();
- if (sconn && sconn->smb1.negprot.auth_context) {
- TALLOC_FREE(sconn->smb1.negprot.auth_context);
- }
-
if (sconn) {
NTSTATUS status;
+ TALLOC_FREE(sconn->smb1.negprot.auth_context);
+
if (lp_log_writeable_files_on_exit()) {
bool found = false;
files_forall(sconn, log_writeable_file_fn, &found);