aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-11-10 20:05:42 -0500
committerJustin M. Keyes <justinkz@gmail.com>2014-11-10 20:05:42 -0500
commitfc19f0c4c6773ff8b10c14492da2acf3601d8cbc (patch)
tree68ecc9a6718caf0cdb1bca365ce6373944af1357 /src/nvim/ex_getln.c
parent3080672650b1a6583684edfdafef7e07c0c7cf56 (diff)
parenta6548e4fb34d50fbd49d0878618c3aecefabe79b (diff)
downloadrneovim-fc19f0c4c6773ff8b10c14492da2acf3601d8cbc.tar.gz
rneovim-fc19f0c4c6773ff8b10c14492da2acf3601d8cbc.tar.bz2
rneovim-fc19f0c4c6773ff8b10c14492da2acf3601d8cbc.zip
Merge pull request #1431 from elmart/clang-analysis-fixes-2
Fix clang analysis warnings. (2)
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index b8d8837092..5feff4d456 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -4245,8 +4245,10 @@ void init_history(void)
for (i = newlen - 1;; --i) {
if (i >= 0) /* copy newest entries */
temp[i] = history[type][j];
- else /* remove older entries */
+ else { /* remove older entries */
free(history[type][j].hisstr);
+ history[type][j].hisstr = NULL;
+ }
if (--j < 0)
j = hislen - 1;
if (j == hisidx[type])