regex match: Fix unexpected match with empty meta data
authorTakuro Ashie <ashie@clear-code.com>
Tue, 18 Jun 2019 06:54:51 +0000 (15:54 +0900)
committerTakuro Ashie <ashie@clear-code.com>
Tue, 18 Jun 2019 07:03:07 +0000 (16:03 +0900)
commitd4f53887527777296b0982af60f4c0fecdb2f0d9
tree43fe78ce0ee78cf61669f3f0a750d2da236c9c32
parent021f4282ce431a8e915a13b7183adca5f5cac236
regex match: Fix unexpected match with empty meta data

If a user set

  MetaData "foo" "bar"

and a metric does not have meta data (vl->meta == NULL), it causes
unexpected match.

Existance of MetaData config should be checked before meta data in
a metric.

See also: #1930

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
src/match_regex.c