Skip to content

Commit

Permalink
record_accessor: add NULL check(fluent#5846)
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 committed Aug 12, 2022
1 parent fc32552 commit c6fa1cf
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 c6fa1cf

Please sign in to comment.