subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1337231 - /subversion/trunk/subversion/libsvn_client/merge.c
Date Fri, 11 May 2012 16:01:06 GMT
Author: julianfoad
Date: Fri May 11 16:01:05 2012
New Revision: 1337231

URL: http://svn.apache.org/viewvc?rev=1337231&view=rev
Log:
* subversion/libsvn_client/merge.c
  (do_mergeinfo_aware_dir_merge): Avoid a potential error leak.

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

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1337231&r1=1337230&r2=1337231&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Fri May 11 16:01:05 2012
@@ -8496,7 +8496,6 @@ do_mergeinfo_aware_dir_merge(svn_mergein
   svn_ra_session_t *ra_session;
   svn_client__merge_path_t *target_merge_path;
   svn_boolean_t is_rollback = (source->loc1->rev > source->loc2->rev);
-  const char *primary_url = is_rollback ? source->loc1->url : source->loc2->url;
 
   /*** If we get here, we're dealing with related sources from the
        same repository as the target -- merge tracking might be
@@ -8727,11 +8726,11 @@ do_mergeinfo_aware_dir_merge(svn_mergein
   /* Record mergeinfo where appropriate.*/
   if (RECORD_MERGEINFO(merge_b))
     {
-      const char *mergeinfo_path;
+      const svn_client__pathrev_t *primary_loc
+        = is_rollback ? source->loc1 : source->loc2;
+      const char *mergeinfo_path
+        = svn_client__pathrev_fspath(primary_loc, scratch_pool);
 
-      /* ### Leaks merge_conflict_err */
-      SVN_ERR(svn_ra__get_fspath_relative_to_root(ra_session, &mergeinfo_path,
-                                                  primary_url, scratch_pool));
       err = record_mergeinfo_for_dir_merge(result_catalog,
                                            &range,
                                            mergeinfo_path,



Mime
View raw message