http_client: log allocation failures for request headers
Calls to flb_realloc() normally log allocation failures with
flb_errno(). This commit adds this missing logging.
This should help disambiguate errors in flb_http_do() that are due to
memory issues as opposed to HTTP-level issues.
@@ -1128,6 +1128,7 @@ int flb_http_do(struct flb_http_client *c, size_t *bytes)
new_size = c->header_size + 2;
tmp = flb_realloc(c->header_buf, new_size);
if (!tmp) {
+ flb_errno();
return -1;
}
c->header_buf = tmp;
