Author: kotkov
Date: Mon Nov 21 15:04:18 2022
New Revision: 1905436

URL: http://svn.apache.org/viewvc?rev=1905436&view=rev
Log:
Reduce the lifetime of the svn_txdelta_apply2() source stream within the
delta editor that is used for file externals.

* subversion/libsvn_wc/externals.c
  (apply_textdelta): Do not disown the stream, so that it would be closed
   together with the target stream.  The source stream is a local variable
   scoped to the apply_textdelta() function; it's not used anywhere outside/
   after the delta application.

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

Modified: subversion/trunk/subversion/libsvn_wc/externals.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/externals.c?rev=1905436&r1=1905435&r2=1905436&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/externals.c (original)
+++ subversion/trunk/subversion/libsvn_wc/externals.c Mon Nov 21 15:04:18 2022
@@ -645,9 +645,7 @@ apply_textdelta(void *file_baton,
                                               eb->db, eb->wri_abspath,
                                               eb->pool, pool));
 
-  /* Keep historical behavior by disowning the stream; adjust if needed. */
-  svn_txdelta_apply2(svn_stream_disown(src_stream, pool),
-                     dest_stream, NULL, eb->local_abspath, pool,
+  svn_txdelta_apply2(src_stream, dest_stream, NULL, eb->local_abspath, pool,
                      handler, handler_baton);
 
   return SVN_NO_ERROR;


Reply via email to