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
-*- 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.
******************************************************************************/
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*));
}