From 764e2e2f50452cee076a8eaba1a45f7c6cab272c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 20 Nov 2015 16:47:56 -0800 Subject: [PATCH] s3: smbd: Don't explicitly free global_smbXsrv_client->scon. It's a child of global_smbXsrv_client. NB. This is a *fragile* fix. It depends on global_smbXsrv_client->scon bein freed *after* global_smbXsrv_client->session_table, which owns the struct smbXsrv_session being freed that causes bug: BUG: https://bugzilla.samba.org/show_bug.cgi?id=11375 We get away with it as global_smbXsrv_client->scon is one of the first talloc children added to global_smbXsrv_client, so is later on the internal talloc linked list than global_smbXsrv_client->session_table. We need to get access to the struct smbXsrv_session *session associated with global_smbXsrv_client and free that *first*. This looks like a non-trivial problem... Signed-off-by: Jeremy Allison --- source3/smbd/server_exit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c index bf50394..80f118a 100644 --- a/source3/smbd/server_exit.c +++ b/source3/smbd/server_exit.c @@ -221,7 +221,6 @@ static void exit_server_common(enum server_exit_reason how, talloc_free(xconn); DO_PROFILE_INC(disconnect); } - TALLOC_FREE(client->sconn); } sconn = NULL; xconn = NULL; -- 2.6.0.rc2.230.g3dd15c0