mirror of
https://github.com/neovim/neovim.git
synced 2026-07-01 07:16:39 +00:00
Problem: On Windows, the value of `term` is overwritten without freeing
the old allocated value, which may lead to a memory leak.
GCC also gives a "incompatible pointer type" warning about
passing `*term` to os_tty_guess_term().
Solution: Don't override the old allocated value, and copy the guessed
value to `term` if its old value is NULL.