From 31577c55a334d176d503db3565e8499d1b70e525 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Fri, 23 Dec 2016 12:47:06 +0000 Subject: [PATCH] On the 2.4.x branch: merge of r1775833 from trunk: 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 , Stefan Eissing] + *) mod_ext_filter: Don't interfere with "error buckets" issued by other modules. PR60375. [Eric Covener, Lubos Uhliarik] diff --git a/modules/http2/h2_bucket_beam.c b/modules/http2/h2_bucket_beam.c index 3d78a7937d7..6d0b04920db 100644 --- a/modules/http2/h2_bucket_beam.c +++ b/modules/http2/h2_bucket_beam.c @@ -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*)); } -- 2.47.2