]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix leak when refs are sent to a frame during destruction on Haiku
authorPo Lu <luangruo@yahoo.com>
Fri, 14 Jan 2022 09:46:50 +0000 (09:46 +0000)
committerPo Lu <luangruo@yahoo.com>
Fri, 14 Jan 2022 09:46:50 +0000 (09:46 +0000)
* src/haikuterm.c (haiku_read_socket): Free b->ref if it was
sent from a frame that was destroyed.

src/haikuterm.c

index 47199c139c636a3d139331d9d9f60541410254b0..3e99cc1c8d9b6f4bd36b169705a9e1f6349da613 100644 (file)
@@ -3235,7 +3235,10 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
            struct frame *f = haiku_window_to_frame (b->window);
 
            if (!f)
-             continue;
+             {
+               free (b->ref);
+               continue;
+             }
 
            inev.kind = DRAG_N_DROP_EVENT;
            inev.arg = build_string_from_utf8 (b->ref);