Commit 4b9412ec authored by Sean McBride's avatar Sean McBride Committed by Code Review

Merge topic 'invalid-memory-use' into master

4dc4b4f9 Fixed use of memory after its deallocation
parents 915da191 4dc4b4f9
......@@ -734,6 +734,7 @@ void vtkKMeansStatistics::SelectAssessFunctor( vtkTable* inData,
if ( ! kmfunc->Initialize( inData, reqModel, this->DistanceFunctor ) )
{
delete kmfunc;
return;
}
dfunc = kmfunc;
}
......@@ -752,8 +753,8 @@ vtkKMeansAssessFunctor::~vtkKMeansAssessFunctor()
}
// ----------------------------------------------------------------------
bool vtkKMeansAssessFunctor::Initialize( vtkTable* inData,
vtkTable* inModel,
bool vtkKMeansAssessFunctor::Initialize( vtkTable* inData,
vtkTable* inModel,
vtkKMeansDistanceFunctor* dfunc )
{
vtkIdType numObservations = inData->GetNumberOfRows();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment