We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8093875 commit 49039efCopy full SHA for 49039ef
1 file changed
src/x509.c
@@ -1086,15 +1086,15 @@ WOLFSSL_X509_EXTENSION* wolfSSL_X509_set_ext(WOLFSSL_X509* x509, int loc)
1086
XFREE((byte*)ext->obj->obj, NULL, DYNAMIC_TYPE_ASN1);
1087
}
1088
else if (tmp == NULL) {
1089
- ext->obj->obj = tmp;
+ XFREE((byte*)ext->obj->obj, NULL, DYNAMIC_TYPE_ASN1);
1090
1091
ext->obj->obj = tmp;
1092
#else
1093
tmp = (byte*)XREALLOC((byte*)ext->obj->obj, objSz, NULL,
1094
DYNAMIC_TYPE_ASN1);
1095
- if (tmp != NULL) {
1096
1097
- }
+ if (tmp == NULL)
+ ext->obj->obj = tmp;
1098
#endif
1099
if (ext->obj->obj == NULL) {
1100
wolfSSL_X509_EXTENSION_free(ext);
0 commit comments