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/29 00:47:05 UTC
svn commit: r1648272 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c
Author: stefan2
Date: Sun Dec 28 23:47:05 2014
New Revision: 1648272
URL: http://svn.apache.org/r1648272
Log:
Follow-up to r1648253: Fix pool usage issue.
* subversion/libsvn_fs_fs/tree.c
(find_youngest_copyroot): Document that the result will not be allocated
in POOL.
(fs_closest_copy): Call the above with our subpool as scratch pool and
copy the final path into our result pool.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/tree.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1648272&r1=1648271&r2=1648272&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Sun Dec 28 23:47:05 2014
@@ -3487,7 +3487,10 @@ fs_node_history(svn_fs_history_t **histo
/* Find the youngest copyroot for path PARENT_PATH or its parents in
filesystem FS, and store the copyroot in *REV_P and *PATH_P.
- Perform all allocations in POOL. */
+ Perform all allocations in POOL.
+
+ Note that *PATH_P will not be allocated in POOL but will be taken from
+ a DAG node in PARENT_PATH. */
static svn_error_t *
find_youngest_copyroot(svn_revnum_t *rev_p,
const char **path_p,
@@ -3552,7 +3555,7 @@ static svn_error_t *fs_closest_copy(svn_
will indicate the target of the innermost copy affecting the
node-rev. */
SVN_ERR(find_youngest_copyroot(©_dst_rev, ©_dst_path,
- fs, parent_path, pool));
+ fs, parent_path, subpool));
if (copy_dst_rev == 0) /* There are no copies affecting this node-rev. */
{
svn_pool_destroy(subpool);
@@ -3608,7 +3611,7 @@ static svn_error_t *fs_closest_copy(svn_
/* The copy destination checks out. Return it. */
*root_p = copy_dst_root;
- *path_p = copy_dst_path;
+ *path_p = apr_pstrdup(pool, copy_dst_path);
svn_pool_destroy(subpool);
return SVN_NO_ERROR;