]> granicus.if.org Git - apache/commitdiff
On the trunk:
authorStefan Eissing <icing@apache.org>
Fri, 23 Dec 2016 12:42:35 +0000 (12:42 +0000)
committerStefan Eissing <icing@apache.org>
Fri, 23 Dec 2016 12:42:35 +0000 (12:42 +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/trunk@1775833 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http2/h2_bucket_beam.c

diff --git a/CHANGES b/CHANGES
index 92e1c4bdf3c6d7077b00f13e7a0b4345c801629d..5b8986bf3cda36b7a68d55632a30ec40896b5794 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_http2: cleanup beamer registry on server reload, Fixes PR60510.
+     [Pavel Mateja <pavel@verotel.cz>, Stefan Eissing]
+     
   *) mod_proxy_{ajp,fcgi}: Fix a possible crash when reusing an established
      backend connection, happening with LogLevel trace2 or higher configured,
      or at any log level with compilers not detected as C99 compliant (e.g.
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*));
     }