updated for version 7.0-200
diff --git a/src/diff.c b/src/diff.c
index 22cf5af..daa1f19 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1822,14 +1822,20 @@
 
     idx = diff_buf_idx(wp->w_buffer);
     if (idx == DB_COUNT)	/* cannot happen */
+    {
+	vim_free(line_org);
 	return FALSE;
+    }
 
     /* search for a change that includes "lnum" in the list of diffblocks. */
     for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
 	if (lnum <= dp->df_lnum[idx] + dp->df_count[idx])
 	    break;
     if (dp == NULL || diff_check_sanity(curtab, dp) == FAIL)
+    {
+	vim_free(line_org);
 	return FALSE;
+    }
 
     off = lnum - dp->df_lnum[idx];
 
diff --git a/src/edit.c b/src/edit.c
index b0e6f45..25a76a2 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -2698,6 +2698,7 @@
     buf = alloc(LSIZE);
     if (buf == NULL)
 	return;
+    regmatch.regprog = NULL;	/* so that we can goto theend */
 
     /* If 'infercase' is set, don't use 'smartcase' here */
     save_p_scs = p_scs;
@@ -2712,13 +2713,13 @@
 	char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
 
 	if (pat_esc == NULL)
-	    return ;
+	    goto theend ;
 	i = (int)STRLEN(pat_esc) + 10;
 	ptr = alloc(i);
 	if (ptr == NULL)
 	{
 	    vim_free(pat_esc);
-	    return;
+	    goto theend;
 	}
 	vim_snprintf((char *)ptr, i, "^\\s*\\zs\\V%s", pat_esc);
 	regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
diff --git a/src/version.c b/src/version.c
index 42138ca..c8c8834 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    200,
+/**/
     199,
 /**/
     198,