]> 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:03 +0000 (08:58 +0200)
commit9808ccc53f066f5aedcd6ea847f790ea64e72e76
tree7377f8fecfa74c659453ed94b0730faf90a99105
parent5387b71acb833f1f635ab4a20ced0863747ef5c1
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)
test/bio_pw_callback_test.c