1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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.
This commit is contained in:
Jeremy Allison 2010-05-07 06:54:16 -07:00
parent adf4833792
commit 31b12622cf
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -128,6 +128,7 @@ static int smbd_smb2_tcon_destructor(struct smbd_smb2_tcon *tcon)
DLIST_REMOVE(tcon->session->tcons.list, tcon);
if (tcon->compat_conn) {
set_current_service(tcon->compat_conn, 0, true);
close_cnum(tcon->compat_conn, tcon->session->vuid);
}