subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1713672 - /subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c
Date Tue, 10 Nov 2015 15:48:04 GMT
Author: julianfoad
Date: Tue Nov 10 15:48:03 2015
New Revision: 1713672

URL: http://svn.apache.org/viewvc?rev=1713672&view=rev
Log:
On the 'move-tracking-2' branch: Fix memory allocation bug.

Found by: philipm

* subversion/libsvn_delta/branch.c
  (svn_branch_rev_bid_eid_create,
   svn_branch_rev_bid_create): Deep-copy the arguments.

Modified:
    subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c

Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c?rev=1713672&r1=1713671&r2=1713672&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c Tue Nov 10 15:48:03
2015
@@ -877,7 +877,7 @@ svn_branch_rev_bid_eid_create(svn_revnum
 {
   svn_branch_rev_bid_eid_t *id = apr_palloc(result_pool, sizeof(*id));
 
-  id->bid = branch_id;
+  id->bid = apr_pstrdup(result_pool, branch_id);
   id->eid = eid;
   id->rev = rev;
   return id;
@@ -904,7 +904,7 @@ svn_branch_rev_bid_create(svn_revnum_t r
 {
   svn_branch_rev_bid_t *id = apr_palloc(result_pool, sizeof(*id));
 
-  id->bid = branch_id;
+  id->bid = apr_pstrdup(result_pool, branch_id);
   id->rev = rev;
   return id;
 }



Mime
View raw message