Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 106572e

Browse files
AirisXFelipe Zimmerle
authored and
Felipe Zimmerle
committed
The pool pointer is now available for ngx_http_modsecurity_config_cleanup
1 parent 4cde86b commit 106572e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

‎src/ngx_http_modsecurity_common.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ typedef struct {
9393
ngx_flag_t sanity_checks_enabled;
9494

9595
Rules *rules_set;
96+
97+
void *pool;
9698
} ngx_http_modsecurity_conf_t;
9799

98100

‎src/ngx_http_modsecurity_module.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ static void *ngx_http_modsecurity_create_conf(ngx_conf_t *cf)
554554
conf->sanity_checks_enabled = NGX_CONF_UNSET;
555555
conf->rules_set = msc_create_rules_set();
556556
conf->modsec = NULL;
557+
conf->pool = cf->pool;
557558

558559
cln = ngx_pool_cleanup_add(cf->pool, 0);
559560
if (cln == NULL) {
@@ -658,7 +659,7 @@ ngx_http_modsecurity_config_cleanup(void *data)
658659

659660
dd("deleting a loc conf -- RuleSet is: \"%p\"", t->rules_set);
660661

661-
old_pool = ngx_http_modsecurity_pcre_malloc_init(NULL);
662+
old_pool = ngx_http_modsecurity_pcre_malloc_init(t->pool);
662663
msc_rules_cleanup(t->rules_set);
663664
msc_cleanup(t->modsec);
664665
ngx_http_modsecurity_pcre_malloc_done(old_pool);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /