X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=apps%2Fsilcd%2Fcommand.c;h=9ceb7caaf403e11568a81a0eaffc75e3bdf69b07;hp=e5a29e4704a4cb3df08d4fd2cb7d1dd80a23007b;hb=2407b5a8d55101dcc4cccb098888e0e21f6f299c;hpb=23507aeda234b616f9346891d7afce3f0772d091 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);