From: Arne Schwabe Date: Wed, 12 May 2021 13:15:06 +0000 (+0200) Subject: Add missing free_key_ctx for auth_token X-Git-Tag: v2.5.3~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6471fd2ab1d07ad24c2c92e7fbda6bd645dd84c8;p=thirdparty%2Fopenvpn.git 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) --- 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); }