You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by da...@apache.org on 2001/02/17 06:24:39 UTC

cvs commit: jakarta-tomcat/src/native/mod_jk/apache1.3 mod_jk.c

danmil      01/02/16 21:24:39

  Modified:    src/native/mod_jk/apache1.3 mod_jk.c
  Log:
  Free up all allocated memory during shutdown.
  
  Submitted by: Mike Anderson (mmanders@novell.com)
  
  Revision  Changes    Path
  1.5       +14 -1     jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c
  
  Index: mod_jk.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_jk.c	2001/02/02 17:28:47	1.4
  +++ mod_jk.c	2001/02/17 05:24:38	1.5
  @@ -894,6 +894,7 @@
   #endif
   
                   if(wc_open(init_map, conf->log)) {
  +		    map_free(&init_map);  /* we don't need this any more so free it */
                       return;
                   }            
           }
  @@ -927,6 +928,18 @@
       return DECLINED;
   }
   
  +static void exit_handler (server_rec *s, ap_pool *p)
  +{
  +   jk_server_conf_t *conf =
  +       (jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
  +
  +   wc_close(conf->log);
  +   uri_worker_map_free(&(conf->uw_map), conf->log);
  +   map_free(&(conf->uri_to_context));
  +   if (conf->log)
  +      jk_close_file_logger(&(conf->log));
  +}
  +
   static const handler_rec jk_handlers[] =
   {
       { JK_MAGIC_TYPE, jk_handler },
  @@ -952,7 +965,7 @@
       NULL,                       /* [10] logger */
       NULL,                       /* [3] header parser */
       NULL,                       /* apache child process initializer */
  -    NULL,                       /* apache child process exit/cleanup */
  +    exit_handler,               /* apache child process exit/cleanup */
       NULL                        /* [1] post read_request handling */
   #ifdef EAPI
       /*