You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2014/12/05 11:54:59 UTC
svn commit: r1643233 - /subversion/trunk/subversion/libsvn_fs_fs/caching.c
Author: stefan2
Date: Fri Dec 5 10:54:59 2014
New Revision: 1643233
URL: http://svn.apache.org/viewvc?rev=1643233&view=rev
Log:
Follow-up to r1643139: Fix pool cleanup loophole.
* subversion/libsvn_fs_fs/caching.c
(remove_txn_cache_txn,
remove_txn_cache_fs): Since we always register both cleanups, we must
always cleanup the respective other - even if the
cache object itself has already been removed.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/caching.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1643233&r1=1643232&r2=1643233&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Fri Dec 5 10:54:59 2014
@@ -699,14 +699,14 @@ remove_txn_cache_txn(void *baton_void)
if (*baton->to_reset == baton->txn_cache)
{
/* This is equivalent to calling svn_fs_fs__reset_txn_caches(). */
- *baton->to_reset = NULL;
-
- /* It's cleaned up now. Prevent double cleanup. */
- apr_pool_cleanup_kill(baton->fs_pool,
- baton,
- remove_txn_cache_fs);
+ *baton->to_reset = NULL;
}
+ /* It's cleaned up now. Prevent double cleanup. */
+ apr_pool_cleanup_kill(baton->fs_pool,
+ baton,
+ remove_txn_cache_fs);
+
return APR_SUCCESS;
}
@@ -721,14 +721,14 @@ remove_txn_cache_fs(void *baton_void)
if (*baton->to_reset == baton->txn_cache)
{
/* This is equivalent to calling svn_fs_fs__reset_txn_caches(). */
- *baton->to_reset = NULL;
-
- /* It's cleaned up now. Prevent double cleanup. */
- apr_pool_cleanup_kill(baton->txn_pool,
- baton,
- remove_txn_cache_txn);
+ *baton->to_reset = NULL;
}
+ /* It's cleaned up now. Prevent double cleanup. */
+ apr_pool_cleanup_kill(baton->txn_pool,
+ baton,
+ remove_txn_cache_txn);
+
return APR_SUCCESS;
}