]> 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:22:51 +0000 (15:22 +0100)
commit78882cc96511822a7abce3cf2d7d8d268bfc4029
tree6bed8cf027db80a94341580cccea5d2dc3e41b06
parent9df1b9dfc7971b0c7d768e740dc79510e493d533
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