summaryrefslogtreecommitdiff
path: root/src/tsm_screen.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-10-11 12:19:35 +0200
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-10-11 12:19:35 +0200
commit851113718aefe98250c7ee726be78576b74312f0 (patch)
tree20708386d41b7cf8e7de3b42e9b5a7e2f14eb126 /src/tsm_screen.c
parentb194ba8340c303e931102a25462e7d172a0bbc96 (diff)
tsm: screen: fix freeing alternate screen buffers on shutdown
We have to free both, main and alternate buffers on shutdown. We only used to free the currently active buffer. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'src/tsm_screen.c')
-rw-r--r--src/tsm_screen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tsm_screen.c b/src/tsm_screen.c
index 9242caf..1d658a5 100644
--- a/src/tsm_screen.c
+++ b/src/tsm_screen.c
@@ -460,7 +460,8 @@ err_timer:
line_free(con->main_lines[i]);
line_free(con->alt_lines[i]);
}
- free(con->lines);
+ free(con->main_lines);
+ free(con->alt_lines);
free(con->tab_ruler);
err_free:
free(con);
@@ -488,7 +489,8 @@ void tsm_screen_unref(struct tsm_screen *con)
line_free(con->main_lines[i]);
line_free(con->alt_lines[i]);
}
- free(con->lines);
+ free(con->main_lines);
+ free(con->alt_lines);
free(con->tab_ruler);
shl_timer_free(con->timer);
free(con);