]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_auth_digest: fix crash with ONE_PROCESS (debug) mode shutdown.
authorYann Ylavic <ylavic@apache.org>
Wed, 25 Nov 2020 01:56:17 +0000 (01:56 +0000)
committerYann Ylavic <ylavic@apache.org>
Wed, 25 Nov 2020 01:56:17 +0000 (01:56 +0000)
Avoid double free/cleanup by just letting shm/rmm/global_mutex cleanups do
their work on restart/exit.

Set the globals to NULL in initialize_tables() should cleanup_tables() be
called on error.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1883810 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_auth_digest.c

index 1209784278012fe85498ea960e8ab935b64b5d71..480f43bf16418cdedc7fd07a856dd129ae5ae45b 100644 (file)
@@ -261,6 +261,12 @@ static int initialize_tables(server_rec *s, apr_pool_t *ctx)
 
     /* Create the shared memory segment */
 
+    client_shm = NULL;
+    client_rmm = NULL;
+    client_lock = NULL;
+    opaque_lock = NULL;
+    client_list = NULL;
+
     /*
      * Create a unique filename using our pid. This information is
      * stashed in the global variable so the children inherit it.
@@ -407,8 +413,6 @@ static int initialize_module(apr_pool_t *p, apr_pool_t *plog,
     if (initialize_tables(s, p) != OK) {
         return !OK;
     }
-    /* Call cleanup_tables on exit or restart */
-    apr_pool_cleanup_register(p, NULL, cleanup_tables, apr_pool_cleanup_null);
 #endif  /* APR_HAS_SHARED_MEMORY */
     return OK;
 }