summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-01-29 21:31:11 +0000
committernicm <nicm@openbsd.org>2012-01-29 21:31:11 +0000
commit1073c1c11f6f65e567fe8fc626f81f6ce1b99341 (patch)
tree638976002201544bbbf30b6142d806edf6a58310
parentDon't use floating precision while printing PPS in UDP mode. (diff)
downloadwireguard-openbsd-1073c1c11f6f65e567fe8fc626f81f6ce1b99341.tar.xz
wireguard-openbsd-1073c1c11f6f65e567fe8fc626f81f6ce1b99341.zip
Enforce history-limit option when clearing the screen, memory leak
spotted by R I Pienaar.
-rw-r--r--usr.bin/tmux/grid-view.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/grid-view.c b/usr.bin/tmux/grid-view.c
index f9e603f2700..b9edffe81c7 100644
--- a/usr.bin/tmux/grid-view.c
+++ b/usr.bin/tmux/grid-view.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grid-view.c,v 1.9 2011/01/25 23:40:26 nicm Exp $ */
+/* $OpenBSD: grid-view.c,v 1.10 2012/01/29 21:31:11 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -94,8 +94,10 @@ grid_view_clear_history(struct grid *gd)
return;
/* Scroll the lines into the history. */
- for (yy = 0; yy < last; yy++)
+ for (yy = 0; yy < last; yy++) {
+ grid_collect_history(gd);
grid_scroll_history(gd);
+ }
}
/* Clear area. */