comparison src/keymap.c @ 3550:be1bb4dc32b1

[xemacs-hg @ 2006-08-08 15:26:05 by james] Fix a memory leak. <m34pwtpytp.fsf@jerrypc.cs.usu.edu>
author james
date Tue, 08 Aug 2006 15:26:08 +0000
parents 5694c986bd92
children a75979634ce3
comparison
equal deleted inserted replaced
3549:19e39904f5d8 3550:be1bb4dc32b1
3752 if (! c->keys_so_far_malloced) 3752 if (! c->keys_so_far_malloced)
3753 { 3753 {
3754 Lisp_Key_Data *new_ = xnew_array (Lisp_Key_Data, size); 3754 Lisp_Key_Data *new_ = xnew_array (Lisp_Key_Data, size);
3755 memcpy ((void *)new_, (const void *)c->keys_so_far, 3755 memcpy ((void *)new_, (const void *)c->keys_so_far,
3756 c->keys_so_far_total_size * sizeof (Lisp_Key_Data)); 3756 c->keys_so_far_total_size * sizeof (Lisp_Key_Data));
3757 xfree (c->keys_so_far, Lisp_Key_Data);
3758 c->keys_so_far = new_;
3757 } 3759 }
3758 else 3760 else
3759 XREALLOC_ARRAY (c->keys_so_far, Lisp_Key_Data, size); 3761 XREALLOC_ARRAY (c->keys_so_far, Lisp_Key_Data, size);
3760 3762
3761 c->keys_so_far_total_size = size; 3763 c->keys_so_far_total_size = size;