subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1150441 - /subversion/trunk/subversion/libsvn_subr/subst.c
Date Sun, 24 Jul 2011 17:29:23 GMT
Author: rhuijben
Date: Sun Jul 24 17:29:23 2011
New Revision: 1150441

URL: http://svn.apache.org/viewvc?rev=1150441&view=rev
Log:
And resolve another open file handle problem: Translated streams are not closed
when an error occurs in the final translate. This makes us delete an open file
in svn_subst_copy_and_translate4.

* subversion/libsvn_subr/subst.c
  (translated_stream_close): Close inner stream and destroy subpool on errors.

Modified:
    subversion/trunk/subversion/libsvn_subr/subst.c

Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1150441&r1=1150440&r2=1150441&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Sun Jul 24 17:29:23 2011
@@ -1267,15 +1267,16 @@ static svn_error_t *
 translated_stream_close(void *baton)
 {
   struct translated_stream_baton *b = baton;
+  svn_error_t *err = NULL;
 
   if (b->written)
-    SVN_ERR(translate_chunk(b->stream, b->out_baton, NULL, 0, b->iterpool));
+    err = translate_chunk(b->stream, b->out_baton, NULL, 0, b->iterpool);
 
-  SVN_ERR(svn_stream_close(b->stream));
+  err = svn_error_compose_create(err, svn_stream_close(b->stream));
 
   svn_pool_destroy(b->iterpool);
 
-  return SVN_NO_ERROR;
+  return svn_error_trace(err);
 }
 
 



Mime
View raw message