aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_openssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-10 12:27:14 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-10 12:27:14 -0600
commit82128826bb0a92779a9029645525a7dc280671be (patch)
treec01f1cc7cbf9d35618b5b55cc99076bac6488fa1 /tests/hazmat/backends/test_openssl.py
parentcf77d3ad5390e6e00bbb38f379effe8df401fabb (diff)
downloadcryptography-82128826bb0a92779a9029645525a7dc280671be.tar.gz
cryptography-82128826bb0a92779a9029645525a7dc280671be.tar.bz2
cryptography-82128826bb0a92779a9029645525a7dc280671be.zip
don't leak a context in the test
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r--tests/hazmat/backends/test_openssl.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 71250592..a212df4a 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -98,7 +98,9 @@ class TestOpenSSL(object):
def test_ssl_ciphers_registered(self):
meth = backend._lib.TLSv1_method()
- assert backend._lib.SSL_CTX_new(meth) != backend._ffi.NULL
+ ctx = backend._lib.SSL_CTX_new(meth)
+ assert ctx != backend._ffi.NULL
+ backend._lib.SSL_CTX_free(ctx)
def test_evp_ciphers_registered(self):
cipher = backend._lib.EVP_get_cipherbyname("aes-256-cbc")