Fix for four memory leaks, Issue 2100
This commit is contained in:
@@ -381,7 +381,10 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max
|
|||||||
}
|
}
|
||||||
if(UNLIKELY(d[j] == 0.0f)){
|
if(UNLIKELY(d[j] == 0.0f)){
|
||||||
printf("Error in MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization: division by zero. Matrix not decomposable.\n");
|
printf("Error in MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization: division by zero. Matrix not decomposable.\n");
|
||||||
delete ic;
|
delete ic;
|
||||||
|
delete[] DiagMap;
|
||||||
|
delete[] MaxIndizes;
|
||||||
|
delete[] findmap;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
float id = 1.0f/d[j];
|
float id = 1.0f/d[j];
|
||||||
|
@@ -297,7 +297,6 @@ static void calcGradientParams(int oW, int oH, const GradientParams& gradient, s
|
|||||||
if (gp.transpose) {
|
if (gp.transpose) {
|
||||||
gp.bright_top = !gp.bright_top;
|
gp.bright_top = !gp.bright_top;
|
||||||
}
|
}
|
||||||
float *grad = (float *)malloc(w * h * sizeof(float));
|
|
||||||
if (gp.transpose) {
|
if (gp.transpose) {
|
||||||
int tmp = w;
|
int tmp = w;
|
||||||
w = h;
|
w = h;
|
||||||
|
Reference in New Issue
Block a user