comparison src/dict.c @ 10952:835604f3c37a v8.0.0365

patch 8.0.0365: might free a dict item that wasn't allocated commit https://github.com/vim/vim/commit/95c526e1f6d76acafee4b21f5701d6d6ac8c4b5f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 25 14:59:34 2017 +0100 patch 8.0.0365: might free a dict item that wasn't allocated Problem: Might free a dict item that wasn't allocated. Solution: Call dictitem_free(). (Nikolai Pavlov) Use this for b:changedtick.
author Christian Brabandt <cb@256bit.org>
date Sat, 25 Feb 2017 15:00:05 +0100
parents 66f1b5bf3fa6
children a54985a73ab2
comparison
equal deleted inserted replaced
10951:32704a1de17c 10952:835604f3c37a
86 { 86 {
87 /* Remove the item before deleting it, just in case there is 87 /* Remove the item before deleting it, just in case there is
88 * something recursive causing trouble. */ 88 * something recursive causing trouble. */
89 di = HI2DI(hi); 89 di = HI2DI(hi);
90 hash_remove(&d->dv_hashtab, hi); 90 hash_remove(&d->dv_hashtab, hi);
91 clear_tv(&di->di_tv); 91 dictitem_free(di);
92 vim_free(di);
93 --todo; 92 --todo;
94 } 93 }
95 } 94 }
96 hash_clear(&d->dv_hashtab); 95 hash_clear(&d->dv_hashtab);
97 } 96 }