Changes crypto/evp/ and ssl/ code from directly incrementing reference
[openssl.git] / ssl / ssl_cert.c
index 6990ec4..ab2e009 100644 (file)
@@ -190,8 +190,8 @@ CERT *ssl_cert_dup(CERT *cert)
 #ifndef OPENSSL_NO_RSA
        if (cert->rsa_tmp != NULL)
                {
+               RSA_up(cert->rsa_tmp);
                ret->rsa_tmp = cert->rsa_tmp;
-               CRYPTO_add(&ret->rsa_tmp->references, 1, CRYPTO_LOCK_RSA);
                }
        ret->rsa_tmp_cb = cert->rsa_tmp_cb;
 #endif