summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-02-20 02:49:19 +0000
committerBram Moolenaar <Bram@vim.org>2007-02-20 02:49:19 +0000
commitfa3491a0e0e8c91431583ae18ae9605aac24cc3d (patch)
tree38a813ba7bf2e331038e394d85884546b0586f3a /src/diff.c
parent09a16b5f09eaf11d28d8b33cdd6c410c0f40cd5a (diff)
downloadvim-git-fa3491a0e0e8c91431583ae18ae9605aac24cc3d.tar.gz
updated for version 7.0-200v7.0.200
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/diff.c b/src/diff.c
index 22cf5af0d..daa1f19c2 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1822,14 +1822,20 @@ diff_find_change(wp, lnum, startp, endp)
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];