Don't leak extddata, memset after freeing it, not before. From Patrick

Palka.
pull/218/head
nicm 2015-11-22 19:42:57 +00:00
parent 01a2ddf3f8
commit 28e72ae34d
1 changed files with 1 additions and 4 deletions

5
grid.c
View File

@ -368,11 +368,8 @@ grid_clear_lines(struct grid *gd, u_int py, u_int ny)
for (yy = py; yy < py + ny; yy++) {
gl = &gd->linedata[yy];
free(gl->celldata);
memset(gl, 0, sizeof *gl);
free(gl->extddata);
gl->extddata = NULL;
gl->extdsize = 0;
memset(gl, 0, sizeof *gl);
}
}