aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-04-09 14:23:03 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-04-10 22:22:05 -0400
commit0f5a66b1d60063b7e7afc5ad2f001fa00cc8ac1e (patch)
tree63feeb35c1d0b925a3de0da50a355b3d12a58fe6 /src
parentee997266b9c88202e10772a687334d568c2de1f9 (diff)
downloadcryptography-0f5a66b1d60063b7e7afc5ad2f001fa00cc8ac1e.tar.gz
cryptography-0f5a66b1d60063b7e7afc5ad2f001fa00cc8ac1e.tar.bz2
cryptography-0f5a66b1d60063b7e7afc5ad2f001fa00cc8ac1e.zip
free the ASN1_OCTET_STRING instance
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/backends/openssl/x509.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/x509.py b/src/cryptography/hazmat/backends/openssl/x509.py
index 8b77a11b..5d47c5ea 100644
--- a/src/cryptography/hazmat/backends/openssl/x509.py
+++ b/src/cryptography/hazmat/backends/openssl/x509.py
@@ -225,6 +225,9 @@ class _Certificate(object):
asn1_string = self._backend._ffi.cast(
"ASN1_OCTET_STRING *", asn1_string
)
+ asn1_string = self._backend._ffi.gc(
+ asn1_string, self._backend._lib.ASN1_OCTET_STRING_free
+ )
return x509.SubjectKeyIdentifier(
self._backend._ffi.buffer(asn1_string.data, asn1_string.length)[:]
)