You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/11/22 23:29:11 UTC

svn commit: r1544703 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

Author: rhuijben
Date: Fri Nov 22 22:29:10 2013
New Revision: 1544703

URL: http://svn.apache.org/r1544703
Log:
* subversion/libsvn_wc/wc_db.c
  (read_children_info): Move a variable definition of a variable that is
    shared between different loop invocations outside the loop as its
    location might be reused when it gets out of scope. Resolve theoretical
    statement reset problem.

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

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1544703&r1=1544702&r2=1544703&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Nov 22 22:29:10 2013
@@ -8760,6 +8760,7 @@ read_children_info(svn_wc__db_wcroot_t *
   const char *repos_root_url = NULL;
   const char *repos_uuid = NULL;
   apr_int64_t last_repos_id = INVALID_REPOS_ID;
+  const char *last_repos_root_url = NULL;
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_SELECT_NODE_CHILDREN_INFO));
@@ -8824,8 +8825,6 @@ read_children_info(svn_wc__db_wcroot_t *
             }
           else
             {
-              const char *last_repos_root_url = NULL;
-
               apr_int64_t repos_id = svn_sqlite__column_int64(stmt, 1);
               if (!repos_root_url ||
                   (last_repos_id != INVALID_REPOS_ID &&
@@ -8875,8 +8874,14 @@ read_children_info(svn_wc__db_wcroot_t *
               child->depth = svn_sqlite__column_token_null(stmt, 11, depth_map,
                                                            svn_depth_unknown);
               if (new_child)
-                SVN_ERR(is_wclocked(&child->locked, wcroot, child_relpath,
-                                    scratch_pool));
+                {
+                  err = is_wclocked(&child->locked, wcroot, child_relpath,
+                                    scratch_pool);
+
+                  if (err)
+                    SVN_ERR(svn_error_compose_create(err,
+                                                     svn_sqlite__reset(stmt)));
+                }
             }
 
           child->recorded_time = svn_sqlite__column_int64(stmt, 13);