]> 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 06:58:54 +0000 (08:58 +0200)
commitdb3974808181e300053bd37458adfb1706f4c91f
tree4ef1505e9e44239c7bdca0d5f5a5b32c6232c5dc
parentf60bd9992d35ef81513fcc92bac027d5eda82cd7
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