diff --git a/src/ssl.c b/src/ssl.c index 149594eb0..783689da9 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -24436,6 +24436,7 @@ err_exit: #if !defined(NO_ASN) && !defined(NO_PWDBASED) if ((newx509 != NULL) && (type == PKCS12_TYPE)) { wc_PKCS12_free((WC_PKCS12*)newx509); + newx509 = NULL; } #endif _exit: