term: reset: fix reset of the VT struct

1. Free buffers and strings
2. memset() the vt struct
3. re-initialize members that must not be zero

We _could_ replace the memset() with explicit zeroing of all the
members. It’s just that there’s a lot of arrays, so this is much
easier.

Closes #495
This commit is contained in:
Daniel Eklöf 2021-05-08 15:18:25 +02:00
parent bd8c936b00
commit bfd3eb47ec
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 8 additions and 6 deletions

View file

@ -81,6 +81,9 @@
resulting in PGO build failures.
* Wrong colors in the 256-color cube
(https://codeberg.org/dnkl/foot/issues/479).
* Memory leak triggered by “opening” an OSC-8 URI and then resetting
the terminal without closing the URI
(https://codeberg.org/dnkl/foot/issues/495).
### Security