aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/terminal.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-27 07:26:32 +0800
committerGitHub <noreply@github.com>2022-07-27 07:26:32 +0800
commit79872f377019614467a8e03049fb47c067331804 (patch)
tree598bd74a73b0ec82b212b8b2bbe1caec0aa0e05b /src/nvim/terminal.c
parent890d4023cd9de715a0102b1dd26ce249f11a47b4 (diff)
downloadrneovim-79872f377019614467a8e03049fb47c067331804.tar.gz
rneovim-79872f377019614467a8e03049fb47c067331804.tar.bz2
rneovim-79872f377019614467a8e03049fb47c067331804.zip
fix(options): properly free string options (#19510)
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r--src/nvim/terminal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index be49048aec..73af00b5d1 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -451,7 +451,7 @@ void terminal_enter(void)
if (save_curwin == curwin->handle) { // Else: window was closed.
curwin->w_p_cul = save_w_p_cul;
if (save_w_p_culopt) {
- xfree(curwin->w_p_culopt);
+ free_string_option(curwin->w_p_culopt);
curwin->w_p_culopt = save_w_p_culopt;
}
curwin->w_p_culopt_flags = save_w_p_culopt_flags;
@@ -459,7 +459,7 @@ void terminal_enter(void)
curwin->w_p_so = save_w_p_so;
curwin->w_p_siso = save_w_p_siso;
} else if (save_w_p_culopt) {
- xfree(save_w_p_culopt);
+ free_string_option(save_w_p_culopt);
}
// draw the unfocused cursor