From: Pekka Riikonen Date: Mon, 11 Dec 2006 15:25:20 +0000 (+0000) Subject: Check for NULL ske when aborting in error case. X-Git-Tag: silc.client.1.0.4~3 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=035e8257d6db60d093bf3c0c77855486b940ddee;p=silc.git Check for NULL ske when aborting in error case. --- diff --git a/apps/silcd/protocol.c b/apps/silcd/protocol.c index 20525e58..dd80fd0d 100644 --- a/apps/silcd/protocol.c +++ b/apps/silcd/protocol.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 1997 - 2003 Pekka Riikonen + Copyright (C) 1997 - 2006 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -693,7 +693,8 @@ SILC_TASK_CALLBACK(silc_server_protocol_key_exchange) */ /* Send abort notification */ - silc_ske_abort(ctx->ske, ctx->ske->status); + if (ctx->ske) + silc_ske_abort(ctx->ske, ctx->ske->status); /* Unregister the timeout task since the protocol has ended. This was the timeout task to be executed if the protocol is @@ -1652,7 +1653,7 @@ SILC_TASK_CALLBACK(silc_server_protocol_rekey) * Error occured */ - if (ctx->pfs == TRUE) + if (ctx->pfs == TRUE && ctx->ske) /* Send abort notification */ silc_ske_abort(ctx->ske, ctx->ske->status);