subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1304903 - /subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c
Date Sat, 24 Mar 2012 20:08:44 GMT
Author: danielsh
Date: Sat Mar 24 20:08:44 2012
New Revision: 1304903

URL: http://svn.apache.org/viewvc?rev=1304903&view=rev
Log:
On the node_pool branch, restore pre-r1304851 memory behaviour.
See r869165(r29091) (and r867330(r27256)) for the rationale.

Suggested by: gstein

* subversion/libsvn_fs_fs/dag.c
  (svn_fs_fs__dag_clone_child):
    Pass a scratch pool to svn_fs_fs__dag_open().

Modified:
    subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c

Modified: subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c?rev=1304903&r1=1304902&r2=1304903&view=diff
==============================================================================
--- subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c Sat Mar 24 20:08:44 2012
@@ -652,6 +652,7 @@ svn_fs_fs__dag_clone_child(dag_node_t **
   dag_node_t *cur_entry; /* parent's current entry named NAME */
   const svn_fs_id_t *new_node_id; /* node id we'll put into NEW_NODE */
   svn_fs_t *fs = svn_fs_fs__dag_get_fs(parent);
+  apr_pool_t *subpool = svn_pool_create(pool);
 
   /* First check that the parent is mutable. */
   if (! svn_fs_fs__dag_check_mutable(parent))
@@ -666,7 +667,7 @@ svn_fs_fs__dag_clone_child(dag_node_t **
        "Attempted to make a child clone with an illegal name '%s'", name);
 
   /* Find the node named NAME in PARENT's entries list if it exists. */
-  SVN_ERR(svn_fs_fs__dag_open(&cur_entry, parent, name, pool, pool));
+  SVN_ERR(svn_fs_fs__dag_open(&cur_entry, parent, name, pool, subpool));
 
   /* Check for mutability in the node we found.  If it's mutable, we
      don't need to clone it. */
@@ -708,6 +709,7 @@ svn_fs_fs__dag_clone_child(dag_node_t **
     }
 
   /* Initialize the youngster. */
+  svn_pool_destroy(subpool);
   return svn_fs_fs__dag_get_node(child_p, fs, new_node_id, pool);
 }
 



Mime
View raw message