Line 0
Link Here
|
|
|
1 |
--- src/reqpool.c.orig 2021-12-02 04:53:23 UTC |
2 |
+++ src/reqpool.c |
3 |
@@ -67,6 +67,7 @@ request_init_data (request_st * const r, connection * |
4 |
|
5 |
#ifdef HAVE_PCRE |
6 |
if (srv->config_captures) {/*(save 128b per con if no regex conditions)*/ |
7 |
+ r->cond_captures = srv->config_captures; |
8 |
r->cond_match = calloc(srv->config_captures, sizeof(cond_match_t *)); |
9 |
force_assert(NULL != r->cond_match); |
10 |
r->cond_match_data = calloc(srv->config_captures, sizeof(cond_match_t)); |
11 |
@@ -232,7 +233,7 @@ request_free_data (request_st * const r) |
12 |
free(r->cond_cache); |
13 |
#ifdef HAVE_PCRE |
14 |
if (r->cond_match_data) { |
15 |
- for (int i = 0, used = r->con->srv->config_captures; i < used; ++i) { |
16 |
+ for (int i = 0, used = r->cond_captures; i < used; ++i) { |
17 |
#ifdef HAVE_PCRE2_H |
18 |
if (r->cond_match_data[i].match_data) |
19 |
pcre2_match_data_free(r->cond_match_data[i].match_data); |