You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by lg...@apache.org on 2011/07/25 00:29:49 UTC

svn commit: r1150506 - /subversion/trunk/subversion/libsvn_ra_serf/replay.c

Author: lgo
Date: Sun Jul 24 22:29:48 2011
New Revision: 1150506

URL: http://svn.apache.org/viewvc?rev=1150506&view=rev
Log:
Fix file descriptor leakage in svnsync over ra_serf to ra_local. Limit the
lifetime of the file related pool (delta...) to the lifetime of the commit
editor pool.

This is a follow up to r1102690.

* subversion/libsvn_ra_serf/replay.c
  (start_replay): create file_pool as child of dst_rev_pool...
  (svn_ra_serf__replay): ... not of the global session pool.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/replay.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/replay.c?rev=1150506&r1=1150505&r2=1150506&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/replay.c Sun Jul 24 22:29:48 2011
@@ -194,6 +194,7 @@ start_replay(svn_ra_serf__xml_parser_t *
 
       /* Create a pool for the commit editor. */
       ctx->dst_rev_pool = svn_pool_create(ctx->src_rev_pool);
+      ctx->file_pool = svn_pool_create(ctx->dst_rev_pool);
 
       /* ### it would be nice to have a proper scratch_pool.  */
       SVN_ERR(svn_ra_serf__select_revprops(&ctx->props,
@@ -650,7 +651,6 @@ svn_ra_serf__replay(svn_ra_session_t *ra
 
   replay_ctx = apr_pcalloc(pool, sizeof(*replay_ctx));
   replay_ctx->src_rev_pool = pool;
-  replay_ctx->file_pool = svn_pool_create(pool);
   replay_ctx->editor = editor;
   replay_ctx->editor_baton = edit_baton;
   replay_ctx->done = FALSE;