From: lan1120 Date: Fri, 5 Dec 2025 10:09:47 +0000 (+0800) Subject: Fix memory leak in abnormal branch of mlx_kem_dup function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=013e1174df1b3f8a51b393aaa22309dab66d371f;p=thirdparty%2Fopenssl.git Fix memory leak in abnormal branch of mlx_kem_dup function Reviewed-by: Dmitry Belyavskiy Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/29318) --- diff --git a/providers/implementations/keymgmt/mlx_kmgmt.c b/providers/implementations/keymgmt/mlx_kmgmt.c index eb9c7a2aa42..b533468aaa4 100644 --- a/providers/implementations/keymgmt/mlx_kmgmt.c +++ b/providers/implementations/keymgmt/mlx_kmgmt.c @@ -722,6 +722,7 @@ static void *mlx_kem_dup(const void *vkey, int selection) if (ret->xkey == NULL) return ret; /* Fail if the source key is an inconsistent state */ + OPENSSL_free(ret->propq); OPENSSL_free(ret); return NULL; }