mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Fix segfault caused by talloc_free() being called while still processing
The problem here was that with the packet code set to serialise, we can have multiple packets 'processing' at once, and previously the second packet (allowed because we are spining on an event context down the stack) would clear the flag. Andrew Bartlett
This commit is contained in:
parent
60c93b9777
commit
3378911124
@ -85,13 +85,13 @@ void stream_terminate_connection(struct stream_connection *srv_conn, const char
|
||||
*/
|
||||
static void stream_io_handler(struct stream_connection *conn, uint16_t flags)
|
||||
{
|
||||
conn->processing = true;
|
||||
conn->processing++;
|
||||
if (flags & EVENT_FD_WRITE) {
|
||||
conn->ops->send_handler(conn, flags);
|
||||
} else if (flags & EVENT_FD_READ) {
|
||||
conn->ops->recv_handler(conn, flags);
|
||||
}
|
||||
conn->processing = false;
|
||||
conn->processing--;
|
||||
|
||||
if (conn->terminate) {
|
||||
stream_terminate_connection(conn, conn->terminate);
|
||||
|
Loading…
Reference in New Issue
Block a user