[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn_error_compose and (potential) memory leaks

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-11-12 18:21:47 CET

The latest changes in the error functions is nice, but I think I found a
potential problem. When we create a new error, we reuse the child's pool
or create a new one; and that's fine, becsue it means that
svn_error_clear only has to destroy the first pool it gets it hands on
-- which is exactly what it does.

Except when we call svn_error_compose to splice two errors together.
When that happens (I count six places right now), we get a chain of
errors that aren't all allocated from the same pool, which means that
svn_error_clear is bound to leak memory.

Any ideas how to fix this? I'd thought about splicing the pool
hierarchy, but that sounds like a bit of a cruddy hack.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 12 18:22:43 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.