Commit 38cc6848 authored by Joe Orton's avatar Joe Orton
Browse files

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
parent 1b8e2dcd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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, <slavko gmail.com>]
+5 −5
Original line number Diff line number Diff line
@@ -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,