Commit f1898659 authored by David Gobbi's avatar David Gobbi

BUG: Fix memory leak in vtkMNITransformReader.

parent 945bbdea
......@@ -561,6 +561,7 @@ int vtkMNITransformReader::ReadThinPlateSplineTransform(
if (strcmp(identifier, "Displacements") != 0)
{
points->Delete();
vtkErrorMacro("Expected \'Displacements\' in "
<< this->FileName << ":" << this->LineNumber);
return 0;
......@@ -630,6 +631,9 @@ int vtkMNITransformReader::ReadThinPlateSplineTransform(
}
}
displacements->Delete();
points->Delete();
// Create the source and target point lists
vtkPoints *source = vtkPoints::New();
vtkPoints *target = vtkPoints::New();
......
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