subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1300624 - /subversion/trunk/subversion/libsvn_client/merge.c
Date Wed, 14 Mar 2012 16:33:13 GMT
Author: julianfoad
Date: Wed Mar 14 16:33:12 2012
New Revision: 1300624

URL: http://svn.apache.org/viewvc?rev=1300624&view=rev
Log:
Fix two potential future bugs with pool handling.  There was no actual bug
at present because the current callers of this code don't care.

* subversion/libsvn_client/merge.c
  (target_node_location): Duplicate the 'wc_abspath' into the result pool.
  (find_reintegrate_merge): Allocate the target RA session in the result
    pool.

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=1300624&r1=1300623&r2=1300624&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Wed Mar 14 16:33:12 2012
@@ -9267,7 +9267,7 @@ target_node_location(merge_target_t **ta
   merge_target_t *target = apr_palloc(result_pool, sizeof(*target));
   const char *relpath;
 
-  target->abspath = wc_abspath;
+  target->abspath = apr_pstrdup(result_pool, wc_abspath);
   SVN_ERR(svn_wc_read_kind(&target->kind, ctx->wc_ctx, wc_abspath, FALSE,
                            scratch_pool));
   SVN_ERR(svn_wc__node_get_origin(NULL /* is_copy */,
@@ -10509,7 +10509,7 @@ find_reintegrate_merge(svn_ra_session_t 
   SVN_ERR(svn_client__open_ra_session_internal(&target_ra_session, NULL,
                                                target->url,
                                                NULL, NULL, FALSE, FALSE,
-                                               ctx, scratch_pool));
+                                               ctx, result_pool));
 
   SVN_ERR(calculate_left_hand_side(&source.url1, &source.rev1,
                                    &merged_to_source_mergeinfo_catalog,



Mime
View raw message