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=bd865b94287d6794c21fe4af4c7c408781dacf76;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) (cherry picked from commit 013e1174df1b3f8a51b393aaa22309dab66d371f) --- diff --git a/providers/implementations/keymgmt/mlx_kmgmt.c.in b/providers/implementations/keymgmt/mlx_kmgmt.c.in index ebedaea030e..f266ac007c7 100644 --- a/providers/implementations/keymgmt/mlx_kmgmt.c.in +++ b/providers/implementations/keymgmt/mlx_kmgmt.c.in @@ -757,6 +757,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; }