aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/debugger.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-02-03 13:20:48 +0800
committerGitHub <noreply@github.com>2025-02-03 05:20:48 +0000
commit3a2893015759396e5345a1a85e0427705e0570b4 (patch)
tree24228ce9af169ca2d29083b49a18e66d3e7f1564 /src/nvim/debugger.c
parent0c8890e7a771ca26c75a767b9851aaf7bf2c0f90 (diff)
downloadrneovim-3a2893015759396e5345a1a85e0427705e0570b4.tar.gz
rneovim-3a2893015759396e5345a1a85e0427705e0570b4.tar.bz2
rneovim-3a2893015759396e5345a1a85e0427705e0570b4.zip
vim-patch:9.0.1391: "clear" macros are not always used (#32312)
Problem: "clear" macros are not always used. Solution: Use ALLOC_ONE, VIM_CLEAR, CLEAR_POINTER and CLEAR_FIELD in more places. (Yegappan Lakshmanan, closes vim/vim#12104) https://github.com/vim/vim/commit/960dcbd098c761dd623bec9492d5391ff6e8dceb Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/debugger.c')
-rw-r--r--src/nvim/debugger.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/debugger.c b/src/nvim/debugger.c
index f3e4ef0698..e60d04fdfd 100644
--- a/src/nvim/debugger.c
+++ b/src/nvim/debugger.c
@@ -110,13 +110,11 @@ void do_debug(char *cmd)
}
if (debug_oldval != NULL) {
smsg(0, _("Oldval = \"%s\""), debug_oldval);
- xfree(debug_oldval);
- debug_oldval = NULL;
+ XFREE_CLEAR(debug_oldval);
}
if (debug_newval != NULL) {
smsg(0, _("Newval = \"%s\""), debug_newval);
- xfree(debug_newval);
- debug_newval = NULL;
+ XFREE_CLEAR(debug_newval);
}
char *sname = estack_sfile(ESTACK_NONE);
if (sname != NULL) {