summaryrefslogtreecommitdiff
path: root/src/h2.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-11-22 00:49:48 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2021-11-22 16:34:17 -0500
commit670b3a395ff6365bc92889d5aafd72e362dc97c2 (patch)
treed3248c45c29420f35c068b950fc2e6ef85452647 /src/h2.c
parent7512d82ca49f1b579819c2974c61de4e3137c70b (diff)
downloadlighttpd-git-670b3a395ff6365bc92889d5aafd72e362dc97c2.tar.gz
[core] allocate one fewer cond_match_t, if needed
allocate one fewer cond_match_t in r->cond_match_data, if any are needed
Diffstat (limited to 'src/h2.c')
-rw-r--r--src/h2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/h2.c b/src/h2.c
index 07b94071..0f8cca7c 100644
--- a/src/h2.c
+++ b/src/h2.c
@@ -2571,7 +2571,7 @@ h2_init_stream (request_st * const h2r, connection * const con)
r->conditional_is_valid = h2r->conditional_is_valid;
memcpy(r->cond_cache, h2r->cond_cache, used * sizeof(cond_cache_t));
#ifdef HAVE_PCRE
- if (srv->config_captures > 1)
+ if (srv->config_captures)
memcpy(r->cond_match, h2r->cond_match,
srv->config_captures * sizeof(cond_match_t));
#endif