]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix memory leak in abnormal branch of mlx_kem_dup function
authorlan1120 <lanming@huawei.com>
Fri, 5 Dec 2025 10:09:47 +0000 (18:09 +0800)
committerTomas Mraz <tomas@openssl.org>
Thu, 11 Dec 2025 12:05:30 +0000 (13:05 +0100)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29318)

(cherry picked from commit 013e1174df1b3f8a51b393aaa22309dab66d371f)

providers/implementations/keymgmt/mlx_kmgmt.c.in

index ebedaea030e7f500a455890b74a1971f967ccdde..f266ac007c7837503b312d4e993b1eb28369d55f 100644 (file)
@@ -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;
     }