# HG changeset patch # User james # Date 1155050768 0 # Node ID be1bb4dc32b1af7fe198c94dc83c841bfc92402b # Parent 19e39904f5d8cdf50598713f3bc53d6d88d10333 [xemacs-hg @ 2006-08-08 15:26:05 by james] Fix a memory leak. diff -r 19e39904f5d8 -r be1bb4dc32b1 src/ChangeLog --- a/src/ChangeLog Mon Aug 07 21:51:30 2006 +0000 +++ b/src/ChangeLog Tue Aug 08 15:26:08 2006 +0000 @@ -1,3 +1,8 @@ +2006-08-03 Jerry James + + * keymap.c (where_is_recursive_mapper): Use the freshly allocated + storage instead of leaking it. + 2006-08-06 Aidan Kehoe * doc.c (Fsnarf_documentation): diff -r 19e39904f5d8 -r be1bb4dc32b1 src/keymap.c --- a/src/keymap.c Mon Aug 07 21:51:30 2006 +0000 +++ b/src/keymap.c Tue Aug 08 15:26:08 2006 +0000 @@ -3754,6 +3754,8 @@ 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);