summaryrefslogtreecommitdiff
path: root/OpenSSL/crypto/x509.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSSL/crypto/x509.c')
-rw-r--r--OpenSSL/crypto/x509.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenSSL/crypto/x509.c b/OpenSSL/crypto/x509.c
index 5d03d2e..a12220b 100644
--- a/OpenSSL/crypto/x509.c
+++ b/OpenSSL/crypto/x509.c
@@ -883,10 +883,14 @@ init_crypto_x509(PyObject *module)
return 0;
}
+ /* PyModule_AddObject steals a reference.
+ */
+ Py_INCREF((PyObject *)&crypto_X509_Type);
if (PyModule_AddObject(module, "X509", (PyObject *)&crypto_X509_Type) != 0) {
return 0;
}
+ Py_INCREF((PyObject *)&crypto_X509_Type);
if (PyModule_AddObject(module, "X509Type", (PyObject *)&crypto_X509_Type) != 0) {
return 0;
}