changeset 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 b8cd5f4e475d
children d347fe18adaf
files src/ex_cmds2.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1222,8 +1222,8 @@ check_due_timer(void)
 		}
 		else
 		{
+		    remove_timer(timer);
 		    free_timer(timer);
-		    remove_timer(timer);
 		}
 		/* the callback may do anything, start all over */
 		break;
--- a/src/version.c
+++ b/src/version.c
@@ -764,6 +764,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2310,
+/**/
     2309,
 /**/
     2308,