From a47b1915f6c21793dfc0cd12541b1afd3b9badbc Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Thu, 2 Feb 2017 17:00:45 +0000 Subject: [PATCH] Merge r1778319,r1778331 from trunk: Use pconf as parent pool so mutexes get cleaned on restarts/reloads name changes re: suggestion Submitted by: jim Reviewed by: jim, jorton, ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1781432 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 2 ++ modules/core/mod_watchdog.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 64acbbf85e..5a32a640d5 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ Changes with Apache 2.4.26 + *) mod_watchdog: Fix semaphore leak over restarts. [Jim Jagielski] + *) mod_http2: regression fix on PR 59348, on graceful restart, ongoing streams are finished normally before the final GOAWAY is sent. [Stefan Eissing, ] diff --git a/modules/core/mod_watchdog.c b/modules/core/mod_watchdog.c index a5eb4bf04d..9f10c0d718 100644 --- a/modules/core/mod_watchdog.c +++ b/modules/core/mod_watchdog.c @@ -436,19 +436,19 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, { apr_status_t rv; const char *pk = "watchdog_init_module_tag"; - apr_pool_t *pproc = s->process->pool; + apr_pool_t *ppconf = pconf; const apr_array_header_t *wl; if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) /* First time config phase -- skip. */ return OK; - apr_pool_userdata_get((void *)&wd_server_conf, pk, pproc); + apr_pool_userdata_get((void *)&wd_server_conf, pk, ppconf); if (!wd_server_conf) { - if (!(wd_server_conf = apr_pcalloc(pproc, sizeof(wd_server_conf_t)))) + if (!(wd_server_conf = apr_pcalloc(ppconf, sizeof(wd_server_conf_t)))) return APR_ENOMEM; - apr_pool_create(&wd_server_conf->pool, pproc); - apr_pool_userdata_set(wd_server_conf, pk, apr_pool_cleanup_null, pproc); + apr_pool_create(&wd_server_conf->pool, ppconf); + apr_pool_userdata_set(wd_server_conf, pk, apr_pool_cleanup_null, ppconf); } wd_server_conf->s = s; if ((wl = ap_list_provider_names(pconf, AP_WATCHDOG_PGROUP, -- 2.40.0