Mercurial > vim
changeset 7334:6890f5a58109 v7.4.972
commit https://github.com/vim/vim/commit/a98849670674264de699d7ab22ae4b9b32e78f4a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 13 15:08:56 2015 +0100
patch 7.4.972
Problem: Memory leak when there is an error in setting an option.
Solution: Free the saved value (Christian Brabandt)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 13 Dec 2015 15:15:04 +0100 |
parents | 4219bca38d9c |
children | 51ac3ac08833 |
files | src/option.c src/version.c |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/option.c +++ b/src/option.c @@ -4970,7 +4970,12 @@ do_set(arg, opt_flags) /* If error detected, print the error message. */ if (errmsg != NULL) + { +#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL) + vim_free(saved_origval); +#endif goto skip; + } #if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL) if (saved_origval != NULL) {