From: Po Lu Date: Wed, 11 May 2022 06:56:43 +0000 (+0000) Subject: Fix event memory leak on Haiku X-Git-Tag: emacs-29.0.90~1910^2~821 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=70c4b5bdc6d5e534e1a23c05da1b60c47243a192;p=emacs.git Fix event memory leak on Haiku * src/haikuterm.c (haiku_read_socket): Allocate event buffer on the stack. --- diff --git a/src/haikuterm.c b/src/haikuterm.c index a7403314823..ec6a8f0cea1 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -3007,11 +3007,10 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) message_count = 0; button_or_motion_p = 0; do_help = 0; - buf = NULL; + + buf = alloca (200); block_input (); - if (!buf) - buf = xmalloc (200); haiku_read_size (&b_size, false); while (b_size >= 0) {