Skip to content

Commit 27267d7

Browse files
CID 426066 fix check if null before free
1 parent 104c805 commit 27267d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/x509.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14111,7 +14111,9 @@ int wolfSSL_X509_check_ip_asc(WOLFSSL_X509 *x, const char *ipasc,
1411114111
}
1411214112

1411314113
#ifdef WOLFSSL_SMALL_STACK
14114-
XFREE(dCert, x->heap, DYNAMIC_TYPE_DCERT);
14114+
if (x != NULL) {
14115+
XFREE(dCert, x->heap, DYNAMIC_TYPE_DCERT);
14116+
}
1411514117
#endif
1411614118

1411714119
return ret;

0 commit comments

Comments
 (0)