subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1162201 - /subversion/trunk/subversion/libsvn_wc/merge.c
Date Fri, 26 Aug 2011 18:35:17 GMT
Author: danielsh
Date: Fri Aug 26 18:35:17 2011
New Revision: 1162201

URL: http://svn.apache.org/viewvc?rev=1162201&view=rev
Log:
Resolve a tempfile leak.

* subversion/libsvn_wc/merge.c
  (merge_text_file):
    Remove the svn_io_file_del_none tempfile on a non-error return path.
    (To reproduce: use SVN_EDITOR=/bin/true, and in the interactive conflict
    resolver run 'e'dit and 'r'esolve.)

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

Modified: subversion/trunk/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/merge.c?rev=1162201&r1=1162200&r2=1162201&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/merge.c (original)
+++ subversion/trunk/subversion/libsvn_wc/merge.c Fri Aug 26 18:35:17 2011
@@ -1037,7 +1037,7 @@ merge_text_file(svn_skel_t **work_items,
         }
 
       if (*merge_outcome == svn_wc_merge_merged)
-        return SVN_NO_ERROR;
+        goto done;
     }
   else if (contains_conflicts && dry_run)
       *merge_outcome = svn_wc_merge_conflict;
@@ -1074,6 +1074,7 @@ merge_text_file(svn_skel_t **work_items,
       *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
     }
 
+done:
   /* Remove the tempfile after use */
   SVN_ERR(svn_wc__wq_build_file_remove(&work_item,
                                        mt->db, result_target,



Mime
View raw message