comparison src/ex_cmds2.c @ 10078:32bd4001e398 v7.4.2310

commit https://github.com/vim/vim/commit/a5d4121eed942bbbc672a7b00bf20866c17dc858 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 2 22:18:49 2016 +0200 patch 7.4.2310 Problem: Accessing freed memory when a timer does not repeat. Solution: Free after removing it. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Fri, 02 Sep 2016 22:30:07 +0200
parents dc1610dc910f
children 3db463d4df25
comparison
equal deleted inserted replaced
10077:b8cd5f4e475d 10078:32bd4001e398
1220 if (timer->tr_repeat > 0) 1220 if (timer->tr_repeat > 0)
1221 --timer->tr_repeat; 1221 --timer->tr_repeat;
1222 } 1222 }
1223 else 1223 else
1224 { 1224 {
1225 remove_timer(timer);
1225 free_timer(timer); 1226 free_timer(timer);
1226 remove_timer(timer);
1227 } 1227 }
1228 /* the callback may do anything, start all over */ 1228 /* the callback may do anything, start all over */
1229 break; 1229 break;
1230 } 1230 }
1231 if (next_due == -1 || next_due > this_due) 1231 if (next_due == -1 || next_due > this_due)