You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2007/11/20 18:23:40 UTC
svn commit: r596746 - in /tomcat/connectors/trunk/jk:
native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c
native/common/jk_util.c native/common/jk_util.h
xdocs/miscellaneous/changelog.xml
Author: rjung
Date: Tue Nov 20 09:23:39 2007
New Revision: 596746
URL: http://svn.apache.org/viewvc?rev=596746&view=rev
Log:
bugzilla 43873: Fix small memory leak occuring during httpd restart.
Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/common/jk_util.h
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?rev=596746&r1=596745&r2=596746&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Tue Nov 20 09:23:39 2007
@@ -2944,6 +2944,7 @@
if (conf->uw_map)
uri_worker_map_free(&conf->uw_map, NULL);
}
+ jk_free_time_fmt(conf->log);
conf->was_initialized = JK_FALSE;
}
s = s->next;
Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=596746&r1=596745&r2=596746&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Tue Nov 20 09:23:39 2007
@@ -2330,6 +2330,7 @@
if (conf->uw_map)
uri_worker_map_free(&conf->uw_map, NULL);
}
+ jk_free_time_fmt(conf->log);
conf->was_initialized = JK_FALSE;
}
s = s->next;
@@ -2534,8 +2535,11 @@
{
/* hgomez@20070425 */
/* Clean up pointer content */
- if (d != NULL)
- *(jk_logger_t **)d = NULL;
+ if (d != NULL) {
+ jk_logger_t *l = *(jk_logger_t **)d;
+ jk_free_time_fmt(l);
+ l = NULL;
+ }
return APR_SUCCESS;
}
Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?rev=596746&r1=596745&r2=596746&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Tue Nov 20 09:23:39 2007
@@ -410,6 +410,15 @@
}
}
+void jk_free_time_fmt(jk_logger_t *l)
+{
+ if (l && l->log_fmt_subsec &&
+ l->log_fmt != l->log_fmt_subsec) {
+ free((void *)l->log_fmt_subsec);
+ l->log_fmt_subsec = l->log_fmt;
+ }
+}
+
static int set_time_str(char *str, int len, jk_logger_t *l)
{
time_t t;
Modified: tomcat/connectors/trunk/jk/native/common/jk_util.h
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.h?rev=596746&r1=596745&r2=596746&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.h Tue Nov 20 09:23:39 2007
@@ -41,6 +41,8 @@
void jk_set_time_fmt(jk_logger_t *l, const char *jk_log_fmt);
+void jk_free_time_fmt(jk_logger_t *l);
+
int jk_parse_log_level(const char *level);
int jk_open_file_logger(jk_logger_t **l, const char *file, int level);
Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=596746&r1=596745&r2=596746&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Nov 20 09:23:39 2007
@@ -43,6 +43,9 @@
<br />
<subsection name="Native">
<changelog>
+ <fix>
+ <bug>43873</bug>: Fix small memory leak occuring during httpd restart. (rjung)
+ </fix>
<update>
Common: Allow '*' for the worker name in exclusion rules (resp. JkUnMount)
which will override all workers. (rjung)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org