subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r1332742 - /subversion/trunk/subversion/libsvn_delta/compat.c
Date Tue, 01 May 2012 16:28:28 GMT
Author: gstein
Date: Tue May  1 16:28:27 2012
New Revision: 1332742

URL: http://svn.apache.org/viewvc?rev=1332742&view=rev
Log:
Fix some lifetime errors on the property params.

Found by: hwright

* subversion/libsvn_delta/compat.c:
  (add_directory_cb, add_file_cb, add_symlink_cb, alter_directory_cb,
      alter_file_cb): deep copy the props

Modified:
    subversion/trunk/subversion/libsvn_delta/compat.c

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1332742&r1=1332741&r2=1332742&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Tue May  1 16:28:27 2012
@@ -1065,7 +1065,7 @@ add_directory_cb(void *baton,
   change->action = RESTRUCTURE_ADD;
   change->kind = svn_kind_dir;
   change->deleting = replaces_rev;
-  change->props = apr_hash_copy(eb->edit_pool, props);
+  change->props = svn_prop_hash_dup(props, eb->edit_pool);
 
   return SVN_NO_ERROR;
 }
@@ -1102,7 +1102,7 @@ add_file_cb(void *baton,
   change->action = RESTRUCTURE_ADD;
   change->kind = svn_kind_file;
   change->deleting = replaces_rev;
-  change->props = apr_hash_copy(eb->edit_pool, props);
+  change->props = svn_prop_hash_dup(props, eb->edit_pool);
   change->contents_abspath = tmp_filename;
   change->checksum = svn_checksum_dup(md5_checksum, eb->edit_pool);
 
@@ -1125,7 +1125,7 @@ add_symlink_cb(void *baton,
   change->action = RESTRUCTURE_ADD;
   change->kind = svn_kind_symlink;
   change->deleting = replaces_rev;
-  change->props = apr_hash_copy(eb->edit_pool, props);
+  change->props = svn_prop_hash_dup(props, eb->edit_pool);
   /* ### target  */
 #endif
 
@@ -1168,7 +1168,7 @@ alter_directory_cb(void *baton,
      of an earlier copy/move operation.  */
   change->kind = svn_kind_dir;
   change->changing = revision;
-  change->props = apr_hash_copy(eb->edit_pool, props);
+  change->props = svn_prop_hash_dup(props, eb->edit_pool);
 
   return SVN_NO_ERROR;
 }
@@ -1215,7 +1215,7 @@ alter_file_cb(void *baton,
   change->kind = svn_kind_file;
   change->changing = revision;
   if (props != NULL)
-    change->props = apr_hash_copy(eb->edit_pool, props);
+    change->props = svn_prop_hash_dup(props, eb->edit_pool);
   if (contents != NULL)
     {
       change->contents_abspath = tmp_filename;



Mime
View raw message