mirror of
https://github.com/tmux/tmux.git
synced 2025-04-22 04:18:47 +00:00
Don't leak extddata, memset after freeing it, not before. From Patrick
Palka.
This commit is contained in:
parent
01a2ddf3f8
commit
28e72ae34d
5
grid.c
5
grid.c
@ -368,11 +368,8 @@ grid_clear_lines(struct grid *gd, u_int py, u_int ny)
|
|||||||
for (yy = py; yy < py + ny; yy++) {
|
for (yy = py; yy < py + ny; yy++) {
|
||||||
gl = &gd->linedata[yy];
|
gl = &gd->linedata[yy];
|
||||||
free(gl->celldata);
|
free(gl->celldata);
|
||||||
memset(gl, 0, sizeof *gl);
|
|
||||||
|
|
||||||
free(gl->extddata);
|
free(gl->extddata);
|
||||||
gl->extddata = NULL;
|
memset(gl, 0, sizeof *gl);
|
||||||
gl->extdsize = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user