You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2011/04/21 12:53:54 UTC

svn commit: r1095654 - /subversion/trunk/subversion/mod_dav_svn/reports/update.c

Author: philip
Date: Thu Apr 21 10:53:54 2011
New Revision: 1095654

URL: http://svn.apache.org/viewvc?rev=1095654&view=rev
Log:
Avoid closing an already closed file.

* subversion/mod_dav_svn/update.c
  (dav_svn__update_report): Don't abort report after an
   svn_repos_finish_report error.

Patch by:  Chad Nouis <chad.nouis{_AT_}gmail.com>

Modified:
    subversion/trunk/subversion/mod_dav_svn/reports/update.c

Modified: subversion/trunk/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/update.c?rev=1095654&r1=1095653&r2=1095654&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/update.c Thu Apr 21 10:53:54 2011
@@ -1317,6 +1317,11 @@ dav_svn__update_report(const dav_resourc
   /* this will complete the report, and then drive our editor to generate
      the response to the client. */
   serr = svn_repos_finish_report(rbaton, resource->pool);
+
+  /* Whether svn_repos_finish_report returns an error or not we can no
+     longer abort this report as the file has been closed. */
+  rbaton = NULL;
+
   if (serr)
     {
       derr = dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
@@ -1326,10 +1331,6 @@ dav_svn__update_report(const dav_resourc
       goto cleanup;
     }
 
-  /* We're finished with the report baton.  Note that so we don't try
-     to abort this report later. */
-  rbaton = NULL;
-
   /* ### Temporarily disable resource_walks for single-file switch
      operations.  It isn't strictly necessary. */
   if (dst_path && resource_walk)