From 6471fd2ab1d07ad24c2c92e7fbda6bd645dd84c8 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 12 May 2021 15:15:06 +0200 Subject: [PATCH] Add missing free_key_ctx for auth_token This is is a small memory leak as this key is only leaked once per server start. Signed-off-by: Arne Schwabe Acked-by: Antonio Quartulli Message-Id: <20210512131511.1309914-5-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22345.html Signed-off-by: Gert Doering (cherry picked from commit fe39156a386bf0dbe79abe43717c84843830e3c0) --- src/openvpn/init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 23c069267..48091091d 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -2552,6 +2552,7 @@ key_schedule_free(struct key_schedule *ks, bool free_ssl_ctx) if (tls_ctx_initialised(&ks->ssl_ctx) && free_ssl_ctx) { tls_ctx_free(&ks->ssl_ctx); + free_key_ctx(&ks->auth_token_key); } CLEAR(*ks); } -- 2.47.2