Skip to content

Commit

Permalink
record_accessor: add NULL check(#5846)
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 authored and edsiper committed Sep 27, 2022
1 parent 1a4cc61 commit 5c03b2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/flb_record_accessor.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,9 @@ int flb_ra_regex_match(struct flb_record_accessor *ra, msgpack_object map,
struct flb_ra_parser *rp;

rp = mk_list_entry_first(&ra->list, struct flb_ra_parser, _head);
if (rp == NULL || rp->key == NULL) {
return -1;
}
return flb_ra_key_regex_match(rp->key->name, map, rp->key->subkeys,
regex, result);
}
Expand Down

0 comments on commit 5c03b2e

Please sign in to comment.