]> git.ipfire.org Git - thirdparty/openssl.git/commit
apps/pkeyutl.c: Add OPENSSL_free() to avoid a memory leak
authorJiashengJiang <jiasheng@purdue.edu>
Tue, 22 Apr 2025 13:03:44 +0000 (09:03 -0400)
committerTomas Mraz <tomas@openssl.org>
Tue, 27 May 2025 17:48:01 +0000 (19:48 +0200)
commit0fc85f7494b6951efe0c22fce45547500b3624af
tree6b21a46e19501290e99b27de3abbcc6a1a39a4f8
parentd9a7a8e200e80c875fd54c746e7a67b3f23ee03c
apps/pkeyutl.c: Add OPENSSL_free() to avoid a memory leak

If EVP_PKEY_CTX_ctrl_str() fails, the code jumps to 'end' label without freeing passwd, causing a memory leak.

Fixes: 9d1bf5f7de ("Add option to read pkeyopts interactively")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27470)

(cherry picked from commit 0dc6ea55a13dbe27af234b5328527d0a31ae68eb)
apps/pkeyutl.c