User: james
Date: 06/08/08 17:26:11
Modified: xemacs/src ChangeLog keymap.c
Log:
Fix a memory leak. <m34pwtpytp.fsf(a)jerrypc.cs.usu.edu>
Revision Changes Path
1.997 +5 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.996
retrieving revision 1.997
diff -u -p -r1.996 -r1.997
--- ChangeLog 2006/08/07 20:33:27 1.996
+++ ChangeLog 2006/08/08 15:26:05 1.997
@@ -1,3 +1,8 @@
+2006-08-03 Jerry James <james(a)xemacs.org>
+
+ * keymap.c (where_is_recursive_mapper): Use the freshly allocated
+ storage instead of leaking it.
+
2006-08-06 Aidan Kehoe <kehoea(a)parhasard.net>
* doc.c (Fsnarf_documentation):
1.62 +2 -0 XEmacs/xemacs/src/keymap.c
Index: keymap.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/keymap.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -p -r1.61 -r1.62
--- keymap.c 2005/11/26 13:20:23 1.61
+++ keymap.c 2006/08/08 15:26:08 1.62
@@ -3754,6 +3754,8 @@ where_is_recursive_mapper (Lisp_Object m
Lisp_Key_Data *new_ = xnew_array (Lisp_Key_Data, size);
memcpy ((void *)new_, (const void *)c->keys_so_far,
c->keys_so_far_total_size * sizeof (Lisp_Key_Data));
+ xfree (c->keys_so_far, Lisp_Key_Data);
+ c->keys_so_far = new_;
}
else
XREALLOC_ARRAY (c->keys_so_far, Lisp_Key_Data, size);
Show replies by date