X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fcommand.c;h=9ceb7caaf403e11568a81a0eaffc75e3bdf69b07;hb=2407b5a8d55101dcc4cccb098888e0e21f6f299c;hp=e5a29e4704a4cb3df08d4fd2cb7d1dd80a23007b;hpb=5cc13533608e7163822bf734385ede7a1c142387;p=silc.git diff --git a/apps/silcd/command.c b/apps/silcd/command.c index e5a29e47..9ceb7caa 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -131,7 +131,6 @@ static int silc_server_is_registered(SilcServer server, silc_server_command_send_status_reply(cmd, command, SILC_STATUS_ERR_NOT_REGISTERED); - silc_server_command_free(cmd); return FALSE; } @@ -149,6 +148,11 @@ SILC_TASK_CALLBACK(silc_server_command_process_timeout) SilcServerCommandTimeout timeout = (SilcServerCommandTimeout)context; SilcClientEntry client = (SilcClientEntry)timeout->ctx->sock->user_data; + if (!client) { + silc_server_command_free(timeout->ctx); + silc_free(timeout); + } + /* Update access time */ client->last_command = time(NULL);