From 58fd9c412ad8e91f1453f86ba1fc16479f5b11d0 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 20 Jun 2018 08:50:33 -0700 Subject: Perform an OPENSSL_cleanup before checking the heap in our memleak tests (#4293) * Perform an OPENSSL_cleanup before checking the heap in our memleak tests * Make this binding conditional * typo * need to put this call before we reset the function ptrs --- tests/hazmat/backends/test_openssl_memleak.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/hazmat') diff --git a/tests/hazmat/backends/test_openssl_memleak.py b/tests/hazmat/backends/test_openssl_memleak.py index 74973fe5..cd453541 100644 --- a/tests/hazmat/backends/test_openssl_memleak.py +++ b/tests/hazmat/backends/test_openssl_memleak.py @@ -60,6 +60,9 @@ def main(argv): gc.collect() gc.collect() + if lib.Cryptography_HAS_OPENSSL_CLEANUP: + lib.OPENSSL_cleanup() + # Swap back to the original functions so that if OpenSSL tries to free # something from its atexit handle it won't be going through a Python # function, which will be deallocated when this function returns -- cgit v1.2.3