diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-12-15 16:03:20 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-12-15 16:03:20 -0500 |
commit | 3a61b84543c7cd843fe60d9ec4b356fb18f6a726 (patch) | |
tree | 0b263effdb22e531bf8fe3e699112c44b7593499 | |
parent | 360eb538586ecbbdcbd5a728b6859ee1531f3837 (diff) | |
parent | bf4b85a5d44ec9c985f029ad8d8b1f6c59d1ea39 (diff) | |
download | rneovim-3a61b84543c7cd843fe60d9ec4b356fb18f6a726.tar.gz rneovim-3a61b84543c7cd843fe60d9ec4b356fb18f6a726.tar.bz2 rneovim-3a61b84543c7cd843fe60d9ec4b356fb18f6a726.zip |
Merge pull request #1679 from oni-link/fix.clang.warning
Fix for clang analyzer warning in ops.c
-rw-r--r-- | src/nvim/ops.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 9f73d40761..a6dee2be5b 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -4483,10 +4483,7 @@ int read_viminfo_register(vir_T *virp, int force) if (set_prev) y_previous = y_current; - for (int i = 0; i < y_current->y_size; i++) { - free(y_current->y_array[i]); - } - free(y_current->y_array); + free_yank_all(); array = xmalloc(limit * sizeof(char_u *)); str = skipwhite(skiptowhite(str)); @@ -4515,7 +4512,6 @@ int read_viminfo_register(vir_T *virp, int force) if (do_it) { if (size == 0) { free(array); - y_current->y_array = NULL; } else if (size < limit) { y_current->y_array = xrealloc(array, size * sizeof(char_u *)); } else { |