httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1467765 - /httpd/httpd/trunk/modules/loggers/mod_log_config.c
Date Sun, 14 Apr 2013 11:16:41 GMT
Author: rjung
Date: Sun Apr 14 11:16:40 2013
New Revision: 1467765

URL: http://svn.apache.org/r1467765
Log:
Fix crash in mod_log_config when logging
request end time for a failed request
(LogFormat contains %{end}t).

The request_config for mod_log_config might
not be initialized.

PR 54828.

Modified:
    httpd/httpd/trunk/modules/loggers/mod_log_config.c

Modified: httpd/httpd/trunk/modules/loggers/mod_log_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/loggers/mod_log_config.c?rev=1467765&r1=1467764&r2=1467765&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/loggers/mod_log_config.c (original)
+++ httpd/httpd/trunk/modules/loggers/mod_log_config.c Sun Apr 14 11:16:40 2013
@@ -597,6 +597,10 @@ static apr_time_t get_request_end_time(r
 {
     log_request_state *state = (log_request_state *)ap_get_module_config(r->request_config,
                                                                          &log_config_module);
+    if (!state) {
+        state = apr_pcalloc(r->pool, sizeof(log_request_state));
+        ap_set_module_config(r->request_config, &log_config_module, state);
+    }
     if (state->request_end_time == 0) {
         state->request_end_time = apr_time_now();
     }



Mime
View raw message