summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2011-07-04 17:55:54 +0200
committerKarolin Seeger <kseeger@samba.org>2011-07-26 21:52:08 +0200
commit32845e1f23c508d24d9deb900a8dabd559219a92 (patch)
treec175443f12188e671dbde2c42e2dc22eb11bee6d
parent807cc2ced529ced8a40ff65f11b8748c9abb3761 (diff)
downloadsamba-32845e1f23c508d24d9deb900a8dabd559219a92.tar.gz
samba-32845e1f23c508d24d9deb900a8dabd559219a92.tar.xz
samba-32845e1f23c508d24d9deb900a8dabd559219a92.zip
s3:smb2 fix smbd crash on premature end of smb2 conn (Bug 8286)
when smbd tries to clean up locks after a premature end of a smb2 connection, lock_db has already been freed and so it crashes this patch changes the order in which items are freed so that lock_db is still around when it is needed (cherry picked from commit 2c94ff10332f4be909a158329c41e2f5db035949)
-rw-r--r--source3/smbd/server_exit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c
index a853c77a206..4c71d8fa92a 100644
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -152,9 +152,6 @@ static void exit_server_common(enum server_exit_reason how,
rpc_lsarpc_shutdown();
}
- locking_end();
- printing_end();
-
/*
* we need to force the order of freeing the following,
* because smbd_msg_ctx is not a talloc child of smbd_server_conn.
@@ -165,6 +162,9 @@ static void exit_server_common(enum server_exit_reason how,
server_event_context_free();
TALLOC_FREE(smbd_memcache_ctx);
+ locking_end();
+ printing_end();
+
if (how != SERVER_EXIT_NORMAL) {
DEBUGSEP(0);
DEBUG(0,("Abnormal server exit: %s\n",