Daniel Shahaf <danie...@elego.de> writes: >> @@ -73,6 +95,9 @@ svn_stream_create(void *baton, apr_pool_t *pool) >> stream->mark_fn = NULL; >> stream->seek_fn = NULL; >> stream->buffered_fn = NULL; >> + stream->pool = pool; >> + apr_pool_pre_cleanup_register(stream->pool, stream, >> + close_stream_cleanup); > > Why did you switch to apr_pool_pre_cleanup_register() from > apr_pool_cleanup_register()?
I guess it's because the pool cleanup function can't deregister the cleanup after the pool has been destroyed. The alternative is to reorganise the functions: move the guts of svn_stream_close into a new close_body, have svn_stream_close call deregister and close_body, have the pool cleanup call close_body without deregistering. -- Philip