commit | 960dcbd098c761dd623bec9492d5391ff6e8dceb | [log] [tgz] |
---|---|---|
author | Yegappan Lakshmanan <yegappan@yahoo.com> | Tue Mar 07 17:45:11 2023 +0000 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Mar 07 17:45:11 2023 +0000 |
tree | df2abb6d73be0c31de679fa00251e133a0e99ab6 | |
parent | 14113fdf9cb3d588c0d1c3a210246b981cf5aad3 [diff] [blame] |
patch 9.0.1391: "clear" macros are not always used Problem: "clear" macros are not always used. Solution: Use ALLOC_ONE, VIM_CLEAR, CLEAR_POINTER and CLEAR_FIELD in more places. (Yegappan Lakshmanan, closes #12104)
diff --git a/src/textprop.c b/src/textprop.c index bead146..c6464fc 100644 --- a/src/textprop.c +++ b/src/textprop.c
@@ -1718,8 +1718,7 @@ if (ii < gap->ga_len) { char_u **p = ((char_u **)gap->ga_data) + ii; - vim_free(*p); - *p = NULL; + VIM_CLEAR(*p); did_remove_text = TRUE; } }