Author: jamessan
Date: Mon Jul  2 02:37:52 2018
New Revision: 1834812

URL: http://svn.apache.org/viewvc?rev=1834812&view=rev
Log:
* subversion/libsvn_wc/wc_deb_wcroot.c
  (svn_wc__db_wcroot_parse_local_abspath) Use an iterpool while trying to find
   the abspath of the wcroot

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db_wcroot.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_wcroot.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_wcroot.c?rev=1834812&r1=1834811&r2=1834812&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_wcroot.c Mon Jul  2 02:37:52 
2018
@@ -528,6 +528,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
   const char *adm_relpath;
   /* Non-NULL if WCROOT is found through a symlink: */
   const char *symlink_wcroot_abspath = NULL;
+  apr_pool_t *iterpool;
 
   /* ### we need more logic for finding the database (if it is located
      ### outside of the wcroot) and then managing all of that within DB.
@@ -613,16 +614,20 @@ svn_wc__db_wcroot_parse_local_abspath(sv
      database in the right place. If we find it... great! If not, then
      peel off some components, and try again. */
 
+  iterpool = svn_pool_create(scratch_pool);
   adm_relpath = svn_wc_get_adm_dir(scratch_pool);
   while (TRUE)
     {
       svn_error_t *err;
       svn_node_kind_t adm_subdir_kind;
 
-      const char *adm_subdir = svn_dirent_join(local_abspath, adm_relpath,
-                                               scratch_pool);
+      const char *adm_subdir;
 
-      SVN_ERR(svn_io_check_path(adm_subdir, &adm_subdir_kind, scratch_pool));
+      svn_pool_clear(iterpool);
+
+      adm_subdir = svn_dirent_join(local_abspath, adm_relpath, iterpool);
+
+      SVN_ERR(svn_io_check_path(adm_subdir, &adm_subdir_kind, iterpool));
 
       if (adm_subdir_kind == svn_node_dir)
         {
@@ -697,7 +702,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
 
               SVN_ERR(svn_io_check_resolved_path(local_abspath,
                                                  &resolved_kind,
-                                                 scratch_pool));
+                                                 iterpool));
               if (resolved_kind == svn_node_dir)
                 {
                   /* Is this directory recorded in our hash?  */


Reply via email to