mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 09:31:53 +03:00
Use pcre_free_study() while freeing if using PCRE_study
This commit is contained in:
@@ -21,10 +21,14 @@
|
|||||||
static apr_status_t msc_pcre_cleanup(msc_regex_t *regex) {
|
static apr_status_t msc_pcre_cleanup(msc_regex_t *regex) {
|
||||||
if (regex != NULL) {
|
if (regex != NULL) {
|
||||||
if (regex->pe != NULL) {
|
if (regex->pe != NULL) {
|
||||||
|
#ifdef WITH_PCRE_STUDY
|
||||||
|
pcre_free_study(regex->pe);
|
||||||
|
#else
|
||||||
#if defined(VERSION_NGINX)
|
#if defined(VERSION_NGINX)
|
||||||
pcre_free(regex->pe);
|
pcre_free(regex->pe);
|
||||||
#else
|
#else
|
||||||
free(regex->pe);
|
free(regex->pe);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
regex->pe = NULL;
|
regex->pe = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user