File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1130,18 +1130,22 @@ WOLFSSL_X509_CRL* wolfSSL_X509_CRL_dup(const WOLFSSL_X509_CRL* crl)
11301130
11311131int wolfSSL_X509_CRL_up_ref (WOLFSSL_X509_CRL * crl )
11321132{
1133- if (crl ) {
1134- int ret ;
1135- wolfSSL_RefInc (& crl -> ref , & ret );
1136- if (ret != 0 ) {
1137- WOLFSSL_MSG ("Failed to lock x509 mutex" );
1138- return WOLFSSL_FAILURE ;
1139- }
1133+ int ret ;
11401134
1141- return WOLFSSL_SUCCESS ;
1135+ if (crl == NULL )
1136+ return WOLFSSL_FAILURE ;
1137+
1138+ wolfSSL_RefInc (& crl -> ref , & ret );
1139+ #ifdef WOLFSSL_REFCNT_ERROR_RETURN
1140+ if (ret != 0 ) {
1141+ WOLFSSL_MSG ("Failed to lock x509 mutex" );
1142+ return WOLFSSL_FAILURE ;
11421143 }
1144+ #else
1145+ (void )ret ;
1146+ #endif
11431147
1144- return WOLFSSL_FAILURE ;
1148+ return WOLFSSL_SUCCESS ;
11451149}
11461150
11471151/* returns WOLFSSL_SUCCESS on success. Does not take ownership of newcrl */
You can’t perform that action at this time.
0 commit comments