]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Applied backport of r491907 ->
authorGuenter Knauf <fuankg@apache.org>
Mon, 6 Aug 2007 17:08:10 +0000 (17:08 +0000)
committerGuenter Knauf <fuankg@apache.org>
Mon, 6 Aug 2007 17:08:10 +0000 (17:08 +0000)
http://people.apache.org/~chrisd/patches/mod_dbd_pools_groups/mpm_child_init-netware-2.2.x.patch

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@563195 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/netware/mpm_netware.c

index a6f896335f44e235acb6cc2355756dc9d780be84..a8d0952f8da7550f04feb046147b97abf3651f50 100644 (file)
@@ -191,6 +191,14 @@ static void clean_child_exit(int code, int worker_num, apr_pool_t *ptrans,
     NXThreadExit((void*)&code);
 }
 
+/* proper cleanup when returning from ap_mpm_run() */
+static void mpm_main_cleanup(void)
+{
+    if (pmain) {
+        apr_pool_destroy(pmain);
+    }
+}
+
 AP_DECLARE(apr_status_t) ap_mpm_query(int query_code, int *result)
 {
     switch(query_code){
@@ -934,6 +942,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
             apr_thread_yield();
         }
 
+        mpm_main_cleanup();
         return 1;
     }
     else {  /* the only other way out is a restart */
@@ -956,6 +965,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
         printf ("\nRestarting...\n");
     }
 
+    mpm_main_cleanup();
     return 0;
 }