summaryrefslogtreecommitdiff
path: root/source3/smbd/conn.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-05-07 06:54:16 -0700
committerJeremy Allison <jra@samba.org>2010-05-07 06:54:16 -0700
commit31b12622cf87dc6f7263550120973b6c56e17ba4 (patch)
tree0ca1c8068f3970eef8e9d979171e89f43d3f7515 /source3/smbd/conn.c
parentadf4833792f36653bc8a854aeff47598a046dad6 (diff)
downloadsamba-31b12622cf87dc6f7263550120973b6c56e17ba4.tar.gz
samba-31b12622cf87dc6f7263550120973b6c56e17ba4.tar.bz2
samba-31b12622cf87dc6f7263550120973b6c56e17ba4.zip
When tearing down the connection make sure we close all files before
freeing the global context, as we close access to the locking db before freeing the global context. Jeremy.
Diffstat (limited to 'source3/smbd/conn.c')
-rw-r--r--source3/smbd/conn.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index 803a775e16..afb7a7fa85 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -181,6 +181,13 @@ bool conn_close_all(struct smbd_server_connection *sconn)
/* SMB2 */
if (sconn->smb2.sessions.list &&
sconn->smb2.sessions.list->tcons.list) {
+ struct smbd_smb2_tcon *tcon, *tc_next;
+
+ for (tcon = sconn->smb2.sessions.list->tcons.list;
+ tcon; tcon = tc_next) {
+ tc_next = tcon->next;
+ TALLOC_FREE(tcon);
+ }
return true;
}
return false;