if (r->context) {
pcre2_match_context_free(r->context);
}
- if (r->match) {
- pcre2_match_data_free(r->match);
- }
}
void DetectParseFreeRegexes(void)
FatalError("failed to alloc memory for pcre free list");
}
r->regex = detect_parse->regex;
- r->match = detect_parse->match;
r->next = g_detect_parse_regex_list;
g_detect_parse_regex_list = r;
}
parse_str, en, errbuffer);
return false;
}
- detect_parse->match = pcre2_match_data_create_from_pattern(detect_parse->regex, NULL);
-
DetectParseRegexAddToFreeList(detect_parse);
return true;
SCFree(detect_parse);
return NULL;
}
- detect_parse->match = pcre2_match_data_create_from_pattern(detect_parse->regex, NULL);
detect_parse->next = g_detect_parse_regex_list;
g_detect_parse_regex_list = detect_parse;
typedef struct DetectParseRegex {
pcre2_code *regex;
pcre2_match_context *context;
- pcre2_match_data *match;
struct DetectParseRegex *next;
} DetectParseRegex;
SCLogError("pcre2 could not create match context");
goto error;
}
- pd->parse_regex.match = pcre2_match_data_create_from_pattern(pd->parse_regex.regex, NULL);
if (apply_match_limit) {
if (pcre_match_limit >= -1) {