From cae4d400b9fbcf0aa48f4b8f4023babf7328aa4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kin=C4=8Dl?= Date: Thu, 16 May 2019 16:54:40 +0200 Subject: [PATCH] Removed dead code from wolfSSL_d2i_X509_fp_ex. --- src/ssl.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index bc0eb9bc3..7fad104af 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -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);