Fixed memleak in error situations using automatic distorion feature, reported by GreatBull; see issue #658

This commit is contained in:
Oliver Duis
2011-04-26 07:15:42 +02:00
parent 3a39b0d055
commit e922eb162f

View File

@@ -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) {