Don't leak top line of history and status screen.

This commit is contained in:
Nicholas Marriott 2009-02-16 18:51:39 +00:00
parent a766f9743a
commit a4f5d127e2
2 changed files with 5 additions and 3 deletions

4
grid.c
View File

@ -1,4 +1,4 @@
/* $Id: grid.c,v 1.8 2009-02-10 00:18:06 nicm Exp $ */ /* $Id: grid.c,v 1.9 2009-02-16 18:51:39 nicm Exp $ */
/* /*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@ -107,7 +107,7 @@ grid_destroy(struct grid_data *gd)
{ {
u_int yy; u_int yy;
for (yy = 0; yy < gd->hsize + gd->sy - 1; yy++) { for (yy = 0; yy < gd->hsize + gd->sy; yy++) {
if (gd->data[yy] != NULL) if (gd->data[yy] != NULL)
xfree(gd->data[yy]); xfree(gd->data[yy]);
} }

View File

@ -1,4 +1,4 @@
/* $Id: server.c,v 1.121 2009-02-13 18:57:55 nicm Exp $ */ /* $Id: server.c,v 1.122 2009-02-16 18:51:39 nicm Exp $ */
/* /*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -790,6 +790,8 @@ server_lost_client(struct client *c)
tty_free(&c->tty, c->flags & CLIENT_SUSPENDED); tty_free(&c->tty, c->flags & CLIENT_SUSPENDED);
screen_free(&c->status);
if (c->title != NULL) if (c->title != NULL)
xfree(c->title); xfree(c->title);