CID 426066 fix check if null before free

This commit is contained in:
JacobBarthelmeh 2024-10-22 00:21:26 -06:00
parent 104c805b82
commit 27267d7d2e

View File

@ -14111,7 +14111,9 @@ int wolfSSL_X509_check_ip_asc(WOLFSSL_X509 *x, const char *ipasc,
}
#ifdef WOLFSSL_SMALL_STACK
XFREE(dCert, x->heap, DYNAMIC_TYPE_DCERT);
if (x != NULL) {
XFREE(dCert, x->heap, DYNAMIC_TYPE_DCERT);
}
#endif
return ret;