Fix leak when refs are sent to a frame during destruction on Haiku

* src/haikuterm.c (haiku_read_socket): Free b->ref if it was
sent from a frame that was destroyed.
This commit is contained in:
Po Lu 2022-01-14 09:46:50 +00:00
parent a970a2a489
commit e0268fd7d5

View 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);