summaryrefslogtreecommitdiff
path: root/user/nginx/fix-pcre2-reload-memory-leak.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/nginx/fix-pcre2-reload-memory-leak.patch')
-rw-r--r--user/nginx/fix-pcre2-reload-memory-leak.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/user/nginx/fix-pcre2-reload-memory-leak.patch b/user/nginx/fix-pcre2-reload-memory-leak.patch
new file mode 100644
index 000000000..ee22872f1
--- /dev/null
+++ b/user/nginx/fix-pcre2-reload-memory-leak.patch
@@ -0,0 +1,33 @@
+Source: https://trac.nginx.org/nginx/changeset/533bc2336df44679cc46e6fccf54675e13578f21/nginx
+
+This patch was modified from upstream in the following way(s):
+
+* Update path so that the patch applies correctly
+* dos2unix
+
+Index: src/core/ngx_regex.c
+===================================================================
+--- a/src/core/ngx_regex.c (revision 8163)
++++ b/src/core/ngx_regex.c (revision 9166)
+@@ -601,4 +601,6 @@
+ */
+
++ ngx_regex_malloc_init(NULL);
++
+ if (ngx_regex_compile_context) {
+ pcre2_compile_context_free(ngx_regex_compile_context);
+@@ -611,4 +613,6 @@
+ ngx_regex_match_data_size = 0;
+ }
++
++ ngx_regex_malloc_done();
+
+ #endif
+@@ -707,7 +711,4 @@
+
+ ngx_regex_studies = NULL;
+-#if (NGX_PCRE2)
+- ngx_regex_compile_context = NULL;
+-#endif
+
+ return NGX_OK;