From b9bf5305239423a24ef2bae12c16a276a95de97f Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Tue, 21 Oct 2003 11:36:34 +0000 Subject: [PATCH] Check for disconnected socket in QUIT callback. --- CHANGES | 5 +++++ apps/silcd/command.c | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 711a8a04..29c620ce 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +Tue Oct 21 13:35:57 CEST 2003 Pekka Riikonen + + * Check for disconnected socket in QUIT callback. Affected + file silcd/command.c. + Thu Oct 21 09:43:17 CEST 2003 Jochen Eisinger * Modified the MIME parsing to allow \n and \r\n as delimiters. diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 0d594b9d..b0af7ec8 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -1332,11 +1332,13 @@ SILC_TASK_CALLBACK(silc_server_command_quit_cb) SilcServer server = app_context; QuitInternal q = (QuitInternal)context; - /* Free all client specific data, such as client entry and entires - on channels this client may be on. */ - silc_server_free_client_data(server, q->sock, q->sock->user_data, - TRUE, q->signoff); - q->sock->user_data = NULL; + if (q->sock->user_data) { + /* Free all client specific data, such as client entry and entires + on channels this client may be on. */ + silc_server_free_client_data(server, q->sock, q->sock->user_data, + TRUE, q->signoff); + q->sock->user_data = NULL; + } /* Close the connection on our side */ silc_server_close_connection(server, q->sock); -- 2.43.0