Removed dead code from wolfSSL_d2i_X509_fp_ex.

pull/2245/head
Martin Kinčl 2019-05-16 16:54:40 +02:00
parent 6ab24a2ca3
commit cae4d400b9
1 changed files with 3 additions and 12 deletions

View File

@ -19376,20 +19376,11 @@ static void *wolfSSL_d2i_X509_fp_ex(XFILE file, void **x509, int type)
goto _exit;
err_exit:
if(newx509 != NULL){
if(type == CERT_TYPE)
wolfSSL_X509_free((WOLFSSL_X509*)newx509);
#ifdef HAVE_CRL
else if(type == CRL_TYPE) {
wolfSSL_X509_CRL_free((WOLFSSL_X509_CRL*)newx509);
}
#endif
#if !defined(NO_ASN) && !defined(NO_PWDBASED)
else if(type == PKCS12_TYPE) {
wc_PKCS12_free((WC_PKCS12*)newx509);
}
#endif
if((newx509 != NULL) && (type == PKCS12_TYPE)) {
wc_PKCS12_free((WC_PKCS12*)newx509);
}
#endif
_exit:
if(fileBuffer != NULL)
XFREE(fileBuffer, NULL, DYNAMIC_TYPE_FILE);