The Samba-Bugzilla – Attachment 15880 Details for
Bug 14226
smbd crashes when client disconnects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Test patch for 4.10.
look (text/plain), 1.29 KB, created by
Jeremy Allison
on 2020-03-31 00:28:55 UTC
(
hide
)
Description:
Test patch for 4.10.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2020-03-31 00:28:55 UTC
Size:
1.29 KB
patch
obsolete
>diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c >index 2378c0c15ca..00994740702 100644 >--- a/source3/smbd/server_exit.c >+++ b/source3/smbd/server_exit.c >@@ -110,13 +110,11 @@ static void exit_server_common(enum server_exit_reason how, > /* > * Here we typically have just one connection > */ >- for (; xconn != NULL; xconn = xconn_next) { >- xconn_next = xconn->next; >- DLIST_REMOVE(client->connections, xconn); >- >+ for (; xconn != NULL; xconn = xconn->next) { > /* > * This is typically the disconnect for the only > * (or with multi-channel last) connection of the client >+ * First mark the connections closed. > */ > if (NT_STATUS_IS_OK(xconn->transport.status)) { > switch (how) { >@@ -128,8 +126,6 @@ static void exit_server_common(enum server_exit_reason how, > break; > } > } >- >- TALLOC_FREE(xconn); > DO_PROFILE_INC(disconnect); > } > >@@ -212,6 +208,17 @@ static void exit_server_common(enum server_exit_reason how, > if (client != NULL) { > TALLOC_FREE(client->sconn); > } >+ >+ /* >+ * Now actually free the connections. >+ * Here we typically have just one connection >+ */ >+ for (; xconn != NULL; xconn = xconn_next) { >+ xconn_next = xconn->next; >+ DLIST_REMOVE(client->connections, xconn); >+ TALLOC_FREE(xconn); >+ } >+ > sconn = NULL; > xconn = NULL; > client = NULL;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14226
:
15880
|
15881