]> git.ipfire.org Git - thirdparty/openssl.git/commit
Refactor Callback Tests for Improved Memory Management
authorerbsland-dev <github@erbsland.dev>
Fri, 30 Aug 2024 14:35:38 +0000 (16:35 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 9 Sep 2024 07:04:31 +0000 (09:04 +0200)
commit5cb4fc4b5fb0df04d5e3ff26b4e2a9fb0c5126cd
tree55c39866a7e4123a29e2002b028586703d792159
parent623b7761c75764eb03697acbe820a3e5913bd8f7
Refactor Callback Tests for Improved Memory Management

Refactor the callback test code to replace global variables with local structures, enhancing memory management and reducing reliance on redundant cleanup logic.

Using a local struct containing a magic number and result flag to ensure the correct handling of user data and to verify that the callback function is invoked at least once during the test.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25330)

(cherry picked from commit 9808ccc53f066f5aedcd6ea847f790ea64e72e76)
test/bio_pw_callback_test.c