X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fprotocol.c;h=ad86e001293603e345f9931b3bab9928a28dc100;hb=517c8c6c585abe5e5d971125e367c29fcdee8f4c;hp=ecca5e688776ec5ea88428671ba5056370218227;hpb=7e87feeb3a406211a66f136325ee49ffe53c06f3;p=silc.git diff --git a/apps/silcd/protocol.c b/apps/silcd/protocol.c index ecca5e68..ad86e001 100644 --- a/apps/silcd/protocol.c +++ b/apps/silcd/protocol.c @@ -367,9 +367,12 @@ SILC_TASK_CALLBACK(silc_server_protocol_key_exchange) ctx->responder)) { protocol->state = SILC_PROTOCOL_STATE_ERROR; protocol->execute(server->timeout_queue, 0, protocol, fd, 0, 300000); + silc_ske_free_key_material(keymat); return; } + silc_ske_free_key_material(keymat); + /* Unregister the timeout task since the protocol has ended. This was the timeout task to be executed if the protocol is not completed fast enough. */