Author: stefan2
Date: Thu Jun 25 07:58:05 2015
New Revision: 1687420

URL: http://svn.apache.org/r1687420
Log:
On the fsx-1.10 branch:

* subversion/libsvn_fs_x/cached_data.c
  (get_node_revision_body): Close the rev file ASAP.

Modified:
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/cached_data.c

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/cached_data.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/cached_data.c?rev=1687420&r1=1687419&r2=1687420&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/cached_data.c Thu Jun 
25 07:58:05 2015
@@ -278,6 +278,7 @@ get_node_revision_body(svn_fs_x__noderev
   if (svn_fs_x__is_txn(id->change_set))
     {
       apr_file_t *file;
+      svn_stream_t *stream;
 
       /* This is a transaction node-rev.  Its storage logic is very
          different from that of rev / pack files. */
@@ -298,11 +299,11 @@ get_node_revision_body(svn_fs_x__noderev
           return svn_error_trace(err);
         }
 
-      SVN_ERR(svn_fs_x__read_noderev(noderev_p,
-                                     svn_stream_from_aprfile2(file,
-                                                              FALSE,
-                                                              scratch_pool),
+      /* Be sure to close the file ASAP. */
+      stream = svn_stream_from_aprfile2(file, FALSE, scratch_pool);
+      SVN_ERR(svn_fs_x__read_noderev(noderev_p, stream,
                                      result_pool, scratch_pool));
+      SVN_ERR(svn_stream_close(stream));
     }
   else
     {


Reply via email to