forked from wolfSSL/wolfssl
Fix potential NULL dereference
This commit is contained in:
@@ -824,12 +824,15 @@ out:
|
||||
if (ret != 0) {
|
||||
if (derCert != NULL)
|
||||
FreeDer(&derCert);
|
||||
if (cm != NULL) {
|
||||
XFREE(certId, cm->heap, DYNAMIC_TYPE_OPENSSL);
|
||||
certId = NULL;
|
||||
XFREE(certStatus, cm->heap, DYNAMIC_TYPE_OPENSSL);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
if (cm != NULL)
|
||||
XFREE(cert, cm->heap, DYNAMIC_TYPE_DCERT);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user