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:38:21 UTC

svn commit: r157149 - apr/apr-util/trunk/buckets/apr_buckets_alloc.c

Author: jwoolley
Date: Fri Mar 11 12:38:19 2005
New Revision: 157149

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

Submitted by: Joe Schaefer


Modified:
    apr/apr-util/trunk/buckets/apr_buckets_alloc.c

Modified: apr/apr-util/trunk/buckets/apr_buckets_alloc.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/buckets/apr_buckets_alloc.c?view=diff&r1=157148&r2=157149
==============================================================================
--- apr/apr-util/trunk/buckets/apr_buckets_alloc.c (original)
+++ apr/apr-util/trunk/buckets/apr_buckets_alloc.c Fri Mar 11 12:38:19 2005
@@ -46,6 +46,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;
 }