From e922eb162f633b6319888ba045158b1feeab044d Mon Sep 17 00:00:00 2001 From: Oliver Duis Date: Tue, 26 Apr 2011 07:15:42 +0200 Subject: [PATCH] Fixed memleak in error situations using automatic distorion feature, reported by GreatBull; see issue #658 --- rtengine/klt/trackFeatures.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtengine/klt/trackFeatures.c b/rtengine/klt/trackFeatures.c index 91ee5ce39..5bfb801b1 100644 --- a/rtengine/klt/trackFeatures.c +++ b/rtengine/klt/trackFeatures.c @@ -567,7 +567,9 @@ static int _am_gauss_jordan_elimination(float **a, int n, float **b, int m) row=j; col=k; } - } else if (ipiv[k] > 1) return KLT_SMALL_DET; + } else if (ipiv[k] > 1) { + free(ipiv); free(indxr); free(indxc); return KLT_SMALL_DET; + } } ++(ipiv[col]); if (row != col) {