You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by fu...@apache.org on 2007/08/06 19:08:11 UTC

svn commit: r563195 - /httpd/httpd/branches/2.2.x/server/mpm/netware/mpm_netware.c

Author: fuankg
Date: Mon Aug  6 10:08:10 2007
New Revision: 563195

URL: http://svn.apache.org/viewvc?view=rev&rev=563195
Log:
Applied backport of r491907 ->
http://people.apache.org/~chrisd/patches/mod_dbd_pools_groups/mpm_child_init-netware-2.2.x.patch

Modified:
    httpd/httpd/branches/2.2.x/server/mpm/netware/mpm_netware.c

Modified: httpd/httpd/branches/2.2.x/server/mpm/netware/mpm_netware.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/mpm/netware/mpm_netware.c?view=diff&rev=563195&r1=563194&r2=563195
==============================================================================
--- httpd/httpd/branches/2.2.x/server/mpm/netware/mpm_netware.c (original)
+++ httpd/httpd/branches/2.2.x/server/mpm/netware/mpm_netware.c Mon Aug  6 10:08:10 2007
@@ -191,6 +191,14 @@
     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 @@
             apr_thread_yield();
         }
 
+        mpm_main_cleanup();
         return 1;
     }
     else {  /* the only other way out is a restart */
@@ -956,6 +965,7 @@
         printf ("\nRestarting...\n");
     }
 
+    mpm_main_cleanup();
     return 0;
 }