You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2011/05/14 03:45:48 UTC

Re: svn commit: r1094150 - in /subversion/trunk/subversion/libsvn_fs_fs: caching.c fs.h fs_fs.c fs_fs.h tree.c

stefan2@apache.org wrote on Sun, Apr 17, 2011 at 14:48:34 -0000:
> +static svn_error_t *
> +init_txn_callbacks(svn_cache__t **cache,
> +                   apr_pool_t *pool)
> +{
...
> @@ -386,10 +426,17 @@ svn_fs_fs__initialize_txn_caches(svn_fs_
>                                          pool));
>  
>    /* reset the transaction-specific cache if the pool gets cleaned up. */
> -  apr_pool_cleanup_register(pool,
> -                            &(ffd->txn_dir_cache),
> -                            remove_txn_cache,
> -                            apr_pool_cleanup_null);
> +  init_txn_callbacks(&(ffd->txn_dir_cache), pool);

Error leak.

Re: svn commit: r1094150 - in /subversion/trunk/subversion/libsvn_fs_fs: caching.c fs.h fs_fs.c fs_fs.h tree.c

Posted by Stefan Fuhrmann <st...@alice-dsl.de>.
On 14.05.2011 03:45, Daniel Shahaf wrote:
> stefan2@apache.org wrote on Sun, Apr 17, 2011 at 14:48:34 -0000:
>> +static svn_error_t *
>> +init_txn_callbacks(svn_cache__t **cache,
>> +                   apr_pool_t *pool)
>> +{
> ...
>> @@ -386,10 +426,17 @@ svn_fs_fs__initialize_txn_caches(svn_fs_
>>                                           pool));
>>
>>     /* reset the transaction-specific cache if the pool gets cleaned up. */
>> -  apr_pool_cleanup_register(pool,
>> -&(ffd->txn_dir_cache),
>> -                            remove_txn_cache,
>> -                            apr_pool_cleanup_null);
>> +  init_txn_callbacks(&(ffd->txn_dir_cache), pool);
> Error leak.
Thanks for the feedback.
In r1103413, I decided that init_txn_callbacks
should simply return void.

-- Stefan^2.