Mercurial > vim
comparison src/syntax.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 | 5780bd3a5a7e |
children | d2178a6cc9f3 |
comparison
equal
deleted
inserted
replaced
10951:32704a1de17c | 10952:835604f3c37a |
---|---|
514 * Also do this when a change was made, the current state may be invalid | 514 * Also do this when a change was made, the current state may be invalid |
515 * then. | 515 * then. |
516 */ | 516 */ |
517 if (syn_block != wp->w_s | 517 if (syn_block != wp->w_s |
518 || syn_buf != wp->w_buffer | 518 || syn_buf != wp->w_buffer |
519 || changedtick != *syn_buf->b_changedtick) | 519 || changedtick != CHANGEDTICK(syn_buf)) |
520 { | 520 { |
521 invalidate_current_state(); | 521 invalidate_current_state(); |
522 syn_buf = wp->w_buffer; | 522 syn_buf = wp->w_buffer; |
523 syn_block = wp->w_s; | 523 syn_block = wp->w_s; |
524 } | 524 } |
525 changedtick = *syn_buf->b_changedtick; | 525 changedtick = CHANGEDTICK(syn_buf); |
526 syn_win = wp; | 526 syn_win = wp; |
527 | 527 |
528 /* | 528 /* |
529 * Allocate syntax stack when needed. | 529 * Allocate syntax stack when needed. |
530 */ | 530 */ |