regex: log allocation failures in Onigmo
Calls to flb_malloc() normally log allocation failures with flb_errno().
This commit adds the same logging for allocation failures in the Onigmo
library.
This should help disambiguate errors in flb_regex_do() that are due to
memory issues as opposed to actual regular expression match failures.
@@ -125,6 +125,7 @@ ssize_t flb_regex_do(struct flb_regex *r, const char *str, size_t slen,
region = onig_region_new();
if (!region) {
+ flb_errno();
result->region = NULL;
return -1;
}
