diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-03-05 14:29:28 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-03-05 16:02:15 -0600 |
commit | 791afc0d63f6985227ea18752ccb12fa0987c420 (patch) | |
tree | 700cc063dd7c47458a3a31da142d0555374d5d9d /src | |
parent | 7bfa22ed44332a430cfb13fd864759ec17ae6bf4 (diff) | |
download | cryptography-791afc0d63f6985227ea18752ccb12fa0987c420.tar.gz cryptography-791afc0d63f6985227ea18752ccb12fa0987c420.tar.bz2 cryptography-791afc0d63f6985227ea18752ccb12fa0987c420.zip |
fix a memory leak pointed out by @aftbit and improve changelog phrasing
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/backend.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index 613931f7..65c26ba8 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -708,6 +708,7 @@ class Backend(object): mem_bio.bio, self._ffi.NULL, self._ffi.NULL, self._ffi.NULL ) if rsa_cdata != self._ffi.NULL: + rsa_cdata = self._ffi.gc(rsa_cdata, self._lib.RSA_free) return _RSAPublicKey(self, rsa_cdata) else: self._handle_key_loading_error() @@ -789,6 +790,7 @@ class Backend(object): mem_bio.bio, self._ffi.NULL ) if rsa_cdata != self._ffi.NULL: + rsa_cdata = self._ffi.gc(rsa_cdata, self._lib.RSA_free) return _RSAPublicKey(self, rsa_cdata) else: self._handle_key_loading_error() |