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 2014/06/22 17:16:53 UTC

svn commit: r1604599 - /subversion/trunk/subversion/libsvn_repos/log.c

Author: stsp
Date: Sun Jun 22 15:16:52 2014
New Revision: 1604599

URL: http://svn.apache.org/r1604599
Log:
* subversion/libsvn_repos/log.c
  (send_log): Pass a separate scratch pool to the log receiver callback
   to ensure that no temporary allocations made by the callback persist.

Modified:
    subversion/trunk/subversion/libsvn_repos/log.c

Modified: subversion/trunk/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/log.c?rev=1604599&r1=1604598&r2=1604599&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/log.c (original)
+++ subversion/trunk/subversion/libsvn_repos/log.c Sun Jun 22 15:16:52 2014
@@ -1300,6 +1300,8 @@ send_log(svn_revnum_t rev,
      revision. */
   if (found_rev_of_interest)
     {
+      apr_pool_t *scratch_pool;
+
       /* Is REV a merged revision we've already sent? */
       if (nested_merges && handling_merged_revision)
         {
@@ -1317,12 +1319,14 @@ send_log(svn_revnum_t rev,
             }
         }
 
-      return (*receiver)(receiver_baton, log_entry, pool);
-    }
-  else
-    {
-      return SVN_NO_ERROR;
+      /* Pass a scratch pool to ensure no temporary state stored
+         by the receiver callback persists. */
+      scratch_pool = svn_pool_create(pool);
+      SVN_ERR(receiver(receiver_baton, log_entry, scratch_pool));
+      svn_pool_destroy(scratch_pool);
     }
+
+  return SVN_NO_ERROR;
 }
 
 /* This controls how many history objects we keep open.  For any targets