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 2013/02/16 10:19:24 UTC
svn commit: r1446857 -
/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c
Author: stefan2
Date: Sat Feb 16 09:19:23 2013
New Revision: 1446857
URL: http://svn.apache.org/r1446857
Log:
On the fsfs-format7 branch: Fix an object life-time issue.
* subversion/libsvn_fs_fs/cached_data.c
(svn_fs_fs__rep_chain_length): copy data before clearing pool
Modified:
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c?rev=1446857&r1=1446856&r2=1446857&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c Sat Feb 16 09:19:23 2013
@@ -821,6 +821,7 @@ svn_fs_fs__rep_chain_length(int *chain_l
{
int count = 0;
apr_pool_t *sub_pool = svn_pool_create(pool);
+ svn_boolean_t is_delta = FALSE;
/* Check whether the length of the deltification chain is acceptable.
* Otherwise, shared reps may form a non-skipping delta chain in
@@ -848,6 +849,7 @@ svn_fs_fs__rep_chain_length(int *chain_l
base_rep.item_index = header->base_item_index;
base_rep.size = header->base_length;
base_rep.txn_id = NULL;
+ is_delta = header->is_delta;
++count;
if (count % 16 == 0)
@@ -856,7 +858,7 @@ svn_fs_fs__rep_chain_length(int *chain_l
svn_pool_clear(sub_pool);
}
}
- while (header->is_delta && header->base_revision);
+ while (is_delta && base_rep.revision);
*chain_length = count;
svn_pool_destroy(sub_pool);