Skip to content

Commit

Permalink
pcre
Browse files Browse the repository at this point in the history
  • Loading branch information
svlobanov committed Aug 28, 2024
1 parent 9d65db6 commit f78ce68
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion accel-pppd/cli/show_sessions.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,13 @@ static int show_ses_exec(const char *cmd, char * const *f, int f_cnt, void *cli)
row = list_entry(t_list.next, typeof(*row), entry);
list_del(&row->entry);
if (match_key) {
if (pcre2_match(re, (PCRE2_SPTR)row->match_key, strlen(row->match_key), 0, 0, NULL, NULL) < 0) {
pcre2_match_data *match_data = pcre2_match_data_create(0, NULL);
if (pcre2_match(re, (PCRE2_SPTR)row->match_key, strlen(row->match_key), 0, 0, match_data, NULL) < 0) {
free_row(row);
pcre2_match_data_free(match_data);
continue;
}
pcre2_match_data_free(match_data);
}
if (order_key)
insert_row(&r_list, row);
Expand Down

0 comments on commit f78ce68

Please sign in to comment.