]> granicus.if.org Git - apache/commitdiff
Change the eor bucket to use a pre-cleanup to run the log transaction hook.
authorStefan Fritsch <sf@apache.org>
Mon, 14 Jun 2010 19:07:02 +0000 (19:07 +0000)
committerStefan Fritsch <sf@apache.org>
Mon, 14 Jun 2010 19:07:02 +0000 (19:07 +0000)
This fixes some segfaults.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@954590 13f79535-47bb-0310-9956-ffa450edef68

STATUS
server/eor_bucket.c

diff --git a/STATUS b/STATUS
index b1d1c7945ecc95dff9346cd6c31b696e41949e6f..9ea728164abf2f25665b98d41c32a84200849926 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -75,6 +75,8 @@ RELEASE SHOWSTOPPERS:
 
       http://marc.info/?l=apache-httpd-dev&m=123910381908293&w=1
 
+    sf: Has been changed to a pre-cleanup and should be ok now.
+
   * MPM event (maybe others, too) closes open files only after the
     connection has been closed. This could be fixed in apr-util or httpd:
     http://mail-archives.apache.org/mod_mbox/httpd-dev/201005.mbox/<201005172311.39558.sf@sfritsch.de>
index b758bc92436f99b8714e488bb044875519293577..4d3e1ecfbed6776f36330550141db73be501d9bd 100644 (file)
@@ -73,9 +73,10 @@ AP_DECLARE(apr_bucket *) ap_bucket_eor_create(apr_bucket_alloc_t *list,
          * e.g. the parent pool of the request pool. In this case
          * eor_bucket_destroy might be called at a point of time when the
          * request pool had been already destroyed.
+         * We need to use a pre-cleanup here because a module may create a
+         * sub-pool which is still needed during the log_transaction hook.
          */
-        apr_pool_cleanup_register(r->pool, (void *)b, eor_bucket_cleanup,
-                                  apr_pool_cleanup_null);
+        apr_pool_pre_cleanup_register(r->pool, (void *)b, eor_bucket_cleanup);
     }
     return ap_bucket_eor_make(b, r);
 }