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 2012/06/25 16:10:42 UTC

svn commit: r1353562 - /subversion/trunk/subversion/libsvn_client/update.c

Author: stsp
Date: Mon Jun 25 14:10:41 2012
New Revision: 1353562

URL: http://svn.apache.org/viewvc?rev=1353562&view=rev
Log:
Follow-up to r1353532: Fix a pool lifetime problem.

* subversion/libsvn_client/update.c
  (svn_client_update4): Preserve the iterpool for the conflict-resolving
    loop, and properly manage and use it within that loop.

Found by: svn-slik-w2k3-x64-local

Modified:
    subversion/trunk/subversion/libsvn_client/update.c

Modified: subversion/trunk/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/update.c?rev=1353562&r1=1353561&r2=1353562&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/update.c (original)
+++ subversion/trunk/subversion/libsvn_client/update.c Mon Jun 25 14:10:41 2012
@@ -637,7 +637,6 @@ svn_client_update4(apr_array_header_t **
         APR_ARRAY_PUSH(*result_revs, svn_revnum_t) = result_rev;
     }
 
-  svn_pool_destroy(iterpool);
   if (sleep)
     svn_io_sleep_for_timestamps((paths->nelts == 1) ? path : NULL, pool);
 
@@ -648,6 +647,7 @@ svn_client_update4(apr_array_header_t **
           svn_error_t *err = SVN_NO_ERROR;
           const char *local_abspath;
 
+          svn_pool_clear(iterpool);
           path = APR_ARRAY_IDX(paths, i, const char *);
 
           /* Resolve conflicts within the updated subtree. */
@@ -660,7 +660,7 @@ svn_client_update4(apr_array_header_t **
                                           conflict_func2, conflict_baton2,
                                           ctx->cancel_func, ctx->cancel_baton,
                                           ctx->notify_func2, ctx->notify_baton2,
-                                          pool);
+                                          iterpool);
           if (err)
             {
               if (err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
@@ -671,5 +671,7 @@ svn_client_update4(apr_array_header_t **
         }
     }
 
+  svn_pool_destroy(iterpool);
+
   return SVN_NO_ERROR;
 }