mirror of
https://github.com/neovim/neovim.git
synced 2025-12-12 01:22:41 +00:00
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)
960dcbd098
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -2908,8 +2908,7 @@ void ex_function(exarg_T *eap)
|
||||
fudi.fd_di = tv_dict_item_alloc(fudi.fd_newkey);
|
||||
if (tv_dict_add(fudi.fd_dict, fudi.fd_di) == FAIL) {
|
||||
xfree(fudi.fd_di);
|
||||
xfree(fp);
|
||||
fp = NULL;
|
||||
XFREE_CLEAR(fp);
|
||||
goto erret;
|
||||
}
|
||||
} else {
|
||||
@@ -2967,8 +2966,7 @@ errret_2:
|
||||
XFREE_CLEAR(fp->uf_name_exp);
|
||||
}
|
||||
if (free_fp) {
|
||||
xfree(fp);
|
||||
fp = NULL;
|
||||
XFREE_CLEAR(fp);
|
||||
}
|
||||
errret_keep:
|
||||
ga_clear_strings(&newargs);
|
||||
|
||||
Reference in New Issue
Block a user