Mercurial > vim
diff src/ex_cmds2.c @ 13244:ac42c4b11dbc v8.0.1496
patch 8.0.1496: clearing a pointer takes two lines
commit https://github.com/vim/vim/commit/d23a823669d93fb2a570a039173eefe4856ac806
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 10 18:45:26 2018 +0100
patch 8.0.1496: clearing a pointer takes two lines
Problem: Clearing a pointer takes two lines.
Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi,
closes #2629)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 10 Feb 2018 19:00:07 +0100 |
parents | 9fccd578ce1f |
children | 69278c25429d |
line wrap: on
line diff
--- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1298,7 +1298,6 @@ check_due_timer(void) if (this_due <= 1) { bevalexpr_due_set = FALSE; - if (balloonEval == NULL) { balloonEval = (BalloonEval *)alloc(sizeof(BalloonEval)); @@ -5489,8 +5488,7 @@ free_locales(void) { for (i = 0; locales[i] != NULL; i++) vim_free(locales[i]); - vim_free(locales); - locales = NULL; + VIM_CLEAR(locales); } } # endif