From 404aa06cd5367cdf8db3b65a29929062b5860aa5 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Wed, 3 Mar 2004 14:13:36 +0000 Subject: [PATCH] Check if NULL sock->user_data when closing connection after calling protocol completion in connection closing (it might be closed in the completion). --- apps/silcd/server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/silcd/server.c b/apps/silcd/server.c index bec50d7d..fb4a68dc 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -3412,6 +3412,8 @@ void silc_server_free_sock_user_data(SilcServer server, sock->protocol->state = SILC_PROTOCOL_STATE_ERROR; silc_protocol_execute_final(sock->protocol, server->schedule); sock->protocol = NULL; + if (!sock->user_data) + return; } switch (sock->type) { -- 2.43.0