svn_wc_get_switch_editor() and svn_wc_get_update_editor()
doesn't allocate a memory for svn_wc__compat_notify_baton_t
although it's needed.
---
Allocate a memory for svn_wc__compat_notify_baton_t which is
not temporally used.
* subversion/libsvn_wc/update_editor.c
  (svn_wc_get_update_editor)
  (svn_wc_get_switch_editor): Allocate a memory.
---
Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c	(revision 13554)
+++ subversion/libsvn_wc/update_editor.c	(working copy)
@@ -2561,11 +2561,13 @@
                           svn_wc_traversal_info_t *traversal_info,
                           apr_pool_t *pool)
 {
-  svn_wc__compat_notify_baton_t nb = { notify_func, notify_baton };
-
+  svn_wc__compat_notify_baton_t *nb = apr_palloc (pool, sizeof (*nb));
+  nb->func = notify_func;
+  nb->baton = notify_baton;
+  
   return svn_wc_get_update_editor2 (target_revision, anchor, target,
                                     use_commit_times, recurse,
-                                    svn_wc__compat_call_notify_func, &nb,
+                                    svn_wc__compat_call_notify_func, nb,
                                     cancel_func, cancel_baton, diff3_cmd,
                                     editor, edit_baton, traversal_info, pool);
 }
@@ -2612,11 +2614,13 @@
                           svn_wc_traversal_info_t *traversal_info,
                           apr_pool_t *pool)
 {
-  svn_wc__compat_notify_baton_t nb = { notify_func, notify_baton };
+  svn_wc__compat_notify_baton_t *nb = apr_palloc (pool, sizeof (*nb));
+  nb->func = notify_func;
+  nb->baton = notify_baton;
 
   return svn_wc_get_switch_editor2 (target_revision, anchor, target,
                                     switch_url, use_commit_times, recurse,
-                                    svn_wc__compat_call_notify_func, &nb,
+                                    svn_wc__compat_call_notify_func, nb,
                                     cancel_func, cancel_baton, diff3_cmd,
                                     editor, edit_baton, traversal_info, pool);
 }
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 21 16:31:58 2005