]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
On the 2.4.x branch: merge of r1775833 from trunk:
authorStefan Eissing <icing@apache.org>
Fri, 23 Dec 2016 12:47:06 +0000 (12:47 +0000)
committerStefan Eissing <icing@apache.org>
Fri, 23 Dec 2016 12:47:06 +0000 (12:47 +0000)
Cleanup mod_http2 beamer registry on server reload. Fixes PR60510.

* modules/http2/h2_bucket_beam.c
  register cleanup function on installation that NULLs the beamer
  registry on pool cleanup.

Patch by: Pavel Mateja <pavel@verotel.cz
         me

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1775834 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http2/h2_bucket_beam.c

diff --git a/CHANGES b/CHANGES
index 43ec2edb5445200b40c61d07941b30cc4fdf1f8e..de731959796d9eefb2d17be76211dac3e20b422f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.26
 
+  *) mod_http2: cleanup beamer registry on server reload, Fixes PR60510.
+     [Pavel Mateja <pavel@verotel.cz>, Stefan Eissing]
+     
   *) mod_ext_filter: Don't interfere with "error buckets" issued by other
      modules. PR60375.  [Eric Covener, Lubos Uhliarik]
 
index 3d78a7937d778a9a591bb13ab3cc45298aa8f8ca..6d0b04920db7dd816bc0fa9909bab918082abce3 100644 (file)
@@ -153,10 +153,19 @@ const apr_bucket_type_t h2_bucket_type_beam = {
  ******************************************************************************/
 
 static apr_array_header_t *beamers;
+
+static apr_status_t cleanup_beamers(void *dummy)
+{
+    (void)dummy;
+    beamers = NULL;
+    return APR_SUCCESS;
+}
+
 void h2_register_bucket_beamer(h2_bucket_beamer *beamer)
 {
     if (!beamers) {
+        apr_pool_cleanup_register(apr_hook_global_pool, NULL,
+                                  cleanup_beamers, apr_pool_cleanup_null);
         beamers = apr_array_make(apr_hook_global_pool, 10, 
                                  sizeof(h2_bucket_beamer*));
     }