]> git.ipfire.org Git - thirdparty/openssl.git/commit
crypto/ui/ui_lib.c: Add OPENSSL_free to avoid memory leaks
authorJiashengJiang <jiasheng@purdue.edu>
Tue, 1 Apr 2025 01:22:53 +0000 (21:22 -0400)
committerMatt Caswell <matt@openssl.org>
Mon, 14 Apr 2025 14:19:20 +0000 (15:19 +0100)
commit00ceef41077a050da9357e7ab32c15dd7dd66835
treea9ca59993d6c835a4c35154e2501c927a0baa5e7
parent06a74b6d57c881c756ceb9d1bc48163d4df0f153
crypto/ui/ui_lib.c: Add OPENSSL_free to avoid memory leaks

Add OPENSSL_free() if general_allocate_boolean() or general_allocate_string fails to avoid memory leaks.

Fixes: a63d5eaab2 ("Add a general user interface API. This is designed to replace things like des_read_password and friends (backward compatibility functions using this new API are provided). The purpose is to remove prompting functions from the DES code section as well as provide for prompting through dialog boxes in a window system and the like.")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27218)

(cherry picked from commit 8f06efe234ca875eb09af7f35f1ad3d62be696aa)
crypto/ui/ui_lib.c