In ossl_property_merge() we can drop the realloc because it just makes
the allocation smaller.
In quic-hq-interop.c we check the realloc result.
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26244)
r->has_optional |= copy->optional;
}
r->num_properties = n;
- if (n != t)
- r = OPENSSL_realloc(r, sizeof(*r) + (n - 1) * sizeof(r->properties[0]));
+
return r;
}
while (req != NULL) {
total_requests++;
req_array = OPENSSL_realloc(req_array, sizeof(char *) * total_requests);
+ if (req_array == NULL)
+ goto end;
req_array[total_requests - 1] = req;
req = strtok(NULL, " ");
}