mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
Don't leak extddata, memset after freeing it, not before. From Patrick
Palka.
This commit is contained in:
parent
01a2ddf3f8
commit
28e72ae34d
1 changed files with 1 additions and 4 deletions
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++) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue