]> 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:47:17 +0000 (19:47 +0200)
commit0dc6ea55a13dbe27af234b5328527d0a31ae68eb
tree894304a0261a9233e8c69b007caeb23099973e94
parentfa2e4f7badaf736aa09807feea77572366f8976c
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)
apps/pkeyutl.c