]> 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:06 +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)

providers/implementations/keymgmt/mlx_kmgmt.c

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