aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2018-06-20 08:50:33 -0700
committerPaul Kehrer <paul.l.kehrer@gmail.com>2018-06-20 10:50:33 -0500
commit58fd9c412ad8e91f1453f86ba1fc16479f5b11d0 (patch)
treeccde66f0d6a14a9e12190d58b78f7382f1089b1c /tests/hazmat
parent2d0afd3485a6349924f921d12dc94a302999ae20 (diff)
downloadcryptography-58fd9c412ad8e91f1453f86ba1fc16479f5b11d0.tar.gz
cryptography-58fd9c412ad8e91f1453f86ba1fc16479f5b11d0.tar.bz2
cryptography-58fd9c412ad8e91f1453f86ba1fc16479f5b11d0.zip
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
Diffstat (limited to 'tests/hazmat')
-rw-r--r--tests/hazmat/backends/test_openssl_memleak.py3
1 files changed, 3 insertions, 0 deletions
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