]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1883709 from trunk:
authorYann Ylavic <ylavic@apache.org>
Sun, 13 Dec 2020 10:17:55 +0000 (10:17 +0000)
committerYann Ylavic <ylavic@apache.org>
Sun, 13 Dec 2020 10:17:55 +0000 (10:17 +0000)
mod_example_hooks: fix global "trace" string lifetime.

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

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1884378 13f79535-47bb-0310-9956-ffa450edef68

modules/examples/mod_example_hooks.c

index d818dc1f73a2bb8b7b6a9940d3689e4a7bad7a83..2ab945eb3a6c148f39f94a2d436e65bc387489fc 100644 (file)
@@ -742,7 +742,7 @@ static int x_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
     /*
      * 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 *pconf, apr_pool_t *plog,
     /*
      * 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, apr_pool_t *plog,
     /*
      * 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 *pconf, apr_pool_t *plog,
     /*
      * 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, server_rec *s)
  */
 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);