From 396f4ed6c5dad1fcb14122fd505f5138ba3dc1fa Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Tue, 5 Sep 2023 08:48:41 +0000 Subject: [PATCH] server: Clean up crypto resources on disconnect --- src/server.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server.c b/src/server.c index dd74fe2..ef9caea 100644 --- a/src/server.c +++ b/src/server.c @@ -127,6 +127,11 @@ static void client_close(struct nvnc_client* client) nvnc_fb_unref(client->current_fb); } +#ifdef HAVE_CRYPTO + crypto_key_del(client->apple_dh_secret); + crypto_rsa_pub_key_del(client->rsa.pub); +#endif + LIST_REMOVE(client, link); stream_destroy(client->net_stream); if (client->encoder) {