Jim,
On Tuesday 24 May 2011 12:02:02 Jim Meyering wrote:
> I ran coverity against patch and it reported this legitimate leak.
> It was even triggered by the 'merge" test.
looks correct, but can we use the existing exit path in this function, like
this?
diff --git a/src/bestmatch.h b/src/bestmatch.h
index 958b1ca..e49f7b4 100644
--- a/src/bestmatch.h
+++ b/src/bestmatch.h
@@ -89,7 +89,10 @@ bestmatch(OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim,
fmid_plus_2_min = fmid + 2 * min;
min += yoff;
if (min > ylim)
- return max + 1;
+ {
+ c = max + 1;
+ goto done;
+ }
}
else
fmid_plus_2_min = 0; /* disable this check */
--
Andreas