File: OpenSSL/crypto/crypto.c
Function: initcrypto
Error: ob_refcnt of '*crypto_Error.0' is 1 too low
807  */
808 PyOpenSSL_MODINIT(crypto) {
809 #ifndef PY3
810     static void *crypto_API[crypto_API_pointers];
811     PyObject *c_api_object;
812 #endif
813     PyObject *module;
814 
815     ERR_load_crypto_strings();
816     OpenSSL_add_all_algorithms();
817 
818 #ifdef PY3
819     module = PyModule_Create(&cryptomodule);
820 #else
821     module = Py_InitModule3("crypto", crypto_methods, crypto_doc);
when Py_InitModule4_64() succeeds
822 #endif
823 
824     if (module == NULL) {
taking False path
825         PyOpenSSL_MODRETURN(NULL);
826     }
827 
828 #ifndef PY3
829     /* Initialize the C API pointer array */
830     crypto_API[crypto_X509_New_NUM]      = (void *)crypto_X509_New;
831     crypto_API[crypto_X509Name_New_NUM]  = (void *)crypto_X509Name_New;
832     crypto_API[crypto_X509Req_New_NUM]   = (void *)crypto_X509Req_New;
833     crypto_API[crypto_X509Store_New_NUM] = (void *)crypto_X509Store_New;
834     crypto_API[crypto_PKey_New_NUM]      = (void *)crypto_PKey_New;
835     crypto_API[crypto_X509Extension_New_NUM] = (void *)crypto_X509Extension_New;
836     crypto_API[crypto_PKCS7_New_NUM]     = (void *)crypto_PKCS7_New;
837     crypto_API[crypto_NetscapeSPKI_New_NUM]     = (void *)crypto_NetscapeSPKI_New;
838     c_api_object = PyCObject_FromVoidPtr((void *)crypto_API, NULL);
when PyCObject_FromVoidPtr() succeeds
839     if (c_api_object != NULL)
taking True path
840         PyModule_AddObject(module, "_C_API", c_api_object);
when PyModule_AddObject() succeeds
841 #endif
842 
843     crypto_Error = PyErr_NewException("OpenSSL.crypto.Error", NULL, NULL);
when PyErr_NewException() succeeds
new exception object from PyErr_NewException allocated at:     crypto_Error = PyErr_NewException("OpenSSL.crypto.Error", NULL, NULL);
ob_refcnt is now refs: 1 + N where N >= 0
'*crypto_Error.0' is now referenced by 1 non-stack value(s): crypto_Error
844     if (crypto_Error == NULL)
taking False path
845         goto error;
846     if (PyModule_AddObject(module, "Error", crypto_Error) != 0)
when PyModule_AddObject() succeeds
taking False path
ob_refcnt is now refs: 0 + N where N >= 1
847         goto error;
848 
849     PyModule_AddIntConstant(module, "FILETYPE_PEM",  X509_FILETYPE_PEM);
when PyModule_AddIntConstant() succeeds
850     PyModule_AddIntConstant(module, "FILETYPE_ASN1", X509_FILETYPE_ASN1);
when PyModule_AddIntConstant() succeeds
851     PyModule_AddIntConstant(module, "FILETYPE_TEXT", X509_FILETYPE_TEXT);
when PyModule_AddIntConstant() succeeds
852 
853     PyModule_AddIntConstant(module, "TYPE_RSA", crypto_TYPE_RSA);
when PyModule_AddIntConstant() succeeds
854     PyModule_AddIntConstant(module, "TYPE_DSA", crypto_TYPE_DSA);
when PyModule_AddIntConstant() succeeds
855 
856 #ifdef WITH_THREAD
857     if (!init_openssl_threads())
when considering range: -0x80000000 <= value <= -1
taking False path
858         goto error;
859 #endif
860     if (!init_crypto_x509(module))
when considering range: -0x80000000 <= value <= -1
taking False path
861         goto error;
862     if (!init_crypto_x509name(module))
when considering range: -0x80000000 <= value <= -1
taking False path
863         goto error;
864     if (!init_crypto_x509store(module))
when considering range: -0x80000000 <= value <= -1
taking False path
865         goto error;
866     if (!init_crypto_x509req(module))
when considering range: -0x80000000 <= value <= -1
taking False path
867         goto error;
868     if (!init_crypto_pkey(module))
when considering range: -0x80000000 <= value <= -1
taking False path
869         goto error;
870     if (!init_crypto_x509extension(module))
when considering range: -0x80000000 <= value <= -1
taking False path
871         goto error;
872     if (!init_crypto_pkcs7(module))
when considering range: 1 <= value <= 0x7fffffff
taking False path
873         goto error;
874     if (!init_crypto_pkcs12(module))
when considering range: 1 <= value <= 0x7fffffff
taking False path
875         goto error;
876     if (!init_crypto_netscape_spki(module))
when considering range: -0x80000000 <= value <= -1
taking False path
877         goto error;
878     if (!init_crypto_crl(module))
when considering range: -0x80000000 <= value <= -1
taking False path
879         goto error;
880     if (!init_crypto_revoked(module))
881         goto error;
882 
883     PyOpenSSL_MODRETURN(module);
884 
885 error:
886     PyOpenSSL_MODRETURN(NULL);
887     ;
888 }
ob_refcnt of '*crypto_Error.0' is 1 too low
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: crypto_Error
but final ob_refcnt is N + 0
found 27 similar trace(s) to this