fix null pointer deref (found by cppcheck:nullPointerRedundantCheck) in src/x509.c:wolfSSL_X509_EXTENSION_create_by_OBJ().

This commit is contained in:
Daniel Pouzzner 2023-04-18 14:29:13 -05:00
parent 4180a650c8
commit b87c2fc621

View File

@ -307,7 +307,9 @@ WOLFSSL_X509_EXTENSION* wolfSSL_X509_EXTENSION_create_by_OBJ(
wolfSSL_ASN1_STRING_free(&ret->value);
}
ret->crit = crit;
if (err == 0) {
ret->crit = crit;
}
if (err == 0) {
ret->obj = wolfSSL_ASN1_OBJECT_dup(obj);