You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jw...@apache.org on 2005/03/11 21:41:08 UTC

svn commit: r157150 - apr/apr-util/branches/1.1.x/buckets/apr_buckets_alloc.c

Author: jwoolley
Date: Fri Mar 11 12:41:06 2005
New Revision: 157150

URL: http://svn.apache.org/viewcvs?view=rev&rev=157150
Log:
backport from trunk:
Fix memory leak when in APR_POOL_DEBUG mode.

Submitted by: Joe Schaefer

Modified:
    apr/apr-util/branches/1.1.x/buckets/apr_buckets_alloc.c

Modified: apr/apr-util/branches/1.1.x/buckets/apr_buckets_alloc.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.1.x/buckets/apr_buckets_alloc.c?view=diff&r1=157149&r2=157150
==============================================================================
--- apr/apr-util/branches/1.1.x/buckets/apr_buckets_alloc.c (original)
+++ apr/apr-util/branches/1.1.x/buckets/apr_buckets_alloc.c Fri Mar 11 12:41:06 2005
@@ -45,6 +45,13 @@
     apr_bucket_alloc_t *list = data;
 
     apr_allocator_free(list->allocator, list->blocks);
+
+#if APR_POOL_DEBUG
+    if (list->pool && list->allocator != apr_pool_allocator_get(list->pool)) {
+        apr_allocator_destroy(list->allocator);
+    }
+#endif
+
     return APR_SUCCESS;
 }