Mladen Turk schrieb:
> [EMAIL PROTECTED] wrote:
>> Author: rjung
>> Date: Sun Nov 11 11:22:23 2007
>> New Revision: 593943
>>
>> URL: http://svn.apache.org/viewvc?rev=593943&view=rev
>> Log:
>> Undo revision 593927.
>> This produced a mem leak for vhosts with private JkMounts.
>> No idea why.
>>
> 
> Because uw_map is now allocated *only* if uri_to_context is
> allocated. In other cases uw_map is pointer to the parent
> allocated uw_map. So if you free uw_map with uri_to_context equals
> NULL, you'll actually have a double free of the same pointer.

The point was not a double free (crash), but a memory leak. I freed
uri_to_context in post_config and uw_map in the cleanup. Before freeing
I actually tested both against NULL.

To find out, where th eleak comes from, I also simply didn't initialize
uw_map and still had the leak!

When I didn't initialize uri_to_context in the JkMount config handler,
the leak went away.

With only uri_to_context used and uw_map artificially commented out, I
could open/close the leak by moving the free of uri_to_context from the
cleanup (OK) to post_config (bad). That's what I don't understand.

Regards,

Rainer

P.S.: I hope the other changes are fine with you?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to