You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2020/12/13 10:17:55 UTC

svn commit: r1884378 - in /httpd/httpd/branches/2.4.x: ./ modules/examples/mod_example_hooks.c

Author: ylavic
Date: Sun Dec 13 10:17:55 2020
New Revision: 1884378

URL: http://svn.apache.org/viewvc?rev=1884378&view=rev
Log:
Merge r1883709 from trunk:

mod_example_hooks: fix global "trace" string lifetime.

[Assuming experiment/CTR here, fixes an ASan crash prevent ci]
Reviewed/backported by: ylavic

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/modules/examples/mod_example_hooks.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1883709

Modified: httpd/httpd/branches/2.4.x/modules/examples/mod_example_hooks.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/examples/mod_example_hooks.c?rev=1884378&r1=1884377&r2=1884378&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/examples/mod_example_hooks.c (original)
+++ httpd/httpd/branches/2.4.x/modules/examples/mod_example_hooks.c Sun Dec 13 10:17:55 2020
@@ -742,7 +742,7 @@ static int x_pre_config(apr_pool_t *pcon
     /*
      * Log the call and exit.
      */
-    trace_startup(ptemp, NULL, NULL, "x_pre_config()");
+    trace_startup(pconf, NULL, NULL, "x_pre_config()");
     return OK;
 }
 
@@ -763,7 +763,7 @@ static int x_check_config(apr_pool_t *pc
     /*
      * Log the call and exit.
      */
-    trace_startup(ptemp, s, NULL, "x_check_config()");
+    trace_startup(pconf, s, NULL, "x_check_config()");
     return OK;
 }
 
@@ -800,7 +800,7 @@ static int x_open_logs(apr_pool_t *pconf
     /*
      * Log the call and exit.
      */
-    trace_startup(ptemp, s, NULL, "x_open_logs()");
+    trace_startup(pconf, s, NULL, "x_open_logs()");
     return OK;
 }
 
@@ -820,7 +820,7 @@ static int x_post_config(apr_pool_t *pco
     /*
      * Log the call and exit.
      */
-    trace_startup(ptemp, s, NULL, "x_post_config()");
+    trace_startup(pconf, s, NULL, "x_post_config()");
     return OK;
 }
 
@@ -1448,6 +1448,7 @@ static int x_monitor(apr_pool_t *p, serv
  */
 static void x_register_hooks(apr_pool_t *p)
 {
+    trace = NULL;
     ap_hook_pre_config(x_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_check_config(x_check_config, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_test_config(x_test_config, NULL, NULL, APR_HOOK_MIDDLE);