mirror of
https://github.com/tmux/tmux.git
synced 2026-08-25 08:01:36 +00:00
Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master: Free any remaining items when destroying screen, from Jeong, Heon.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: screen-write.c,v 1.288 2026/08/21 09:53:04 nicm Exp $ */
|
||||
/* $OpenBSD: screen-write.c,v 1.289 2026/08/24 14:07:56 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -338,10 +338,18 @@ screen_write_make_list(struct screen *s)
|
||||
void
|
||||
screen_write_free_list(struct screen *s)
|
||||
{
|
||||
u_int y;
|
||||
struct screen_write_cline *cl;
|
||||
struct screen_write_citem *ci, *ci1;
|
||||
u_int y;
|
||||
|
||||
for (y = 0; y < screen_size_y(s); y++)
|
||||
free(s->write_list[y].data);
|
||||
for (y = 0; y < screen_size_y(s); y++) {
|
||||
cl = &s->write_list[y];
|
||||
TAILQ_FOREACH_SAFE(ci, &cl->items, entry, ci1) {
|
||||
TAILQ_REMOVE(&cl->items, ci, entry);
|
||||
screen_write_free_citem(ci);
|
||||
}
|
||||
free(cl->data);
|
||||
}
|
||||
free(s->write_list);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user