apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: apr_pool_terminate
Date Mon, 08 Aug 2005 22:43:03 GMT
Henry Jen wrote:

> Henry Jen wrote:
>
>> Hi,
>>
>> The debug version of apr_poor_terminate does not support nested 
>> initialization as regular version, is this a bug or on purpose?
>>
>> I guess it is a bug, but want to hear second opinion. :-)
>>
>
>
> I guess no one would care if there is no patch available. So here is a 
> patch. :-)

Yeah. Pity it's wrong...

>Index: memory/unix/apr_pools.c
>===================================================================
>--- memory/unix/apr_pools.c	(revision 230894)
>+++ memory/unix/apr_pools.c	(working copy)
>@@ -1264,7 +1264,8 @@
>     if (!apr_pools_initialized)
>         return;
> 
>-    apr_pools_initialized = 0;
>+    if (--apr_pools_initialized)
>+        return;
>  
>
Take a good look at what happens just before the line you changed.

-- Brane


Mime
View raw message