Commit 4c18c2f7 authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot

Merge topic 'rdsf-leak-fix'

403949f0 fixing memory leaks in vtkRedistributeDataSetFilter
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !6050
parents c5344f87 403949f0
Pipeline #148080 failed with stage
in 0 seconds
......@@ -357,7 +357,8 @@ int vtkRedistributeDataSetFilter::RequestData(
auto outputMBDS = vtkMultiBlockDataSet::SafeDownCast(outputDO);
if (!outputMBDS)
{
outputMBDS = vtkSmartPointer<vtkMultiBlockDataSet>::New();
vtkLogF(ERROR, "output should be a vtkMultiBlockDataSet");
return 0;
}
vtkIdType mb_offset = 0;
return this->RedistributeMultiBlockDataSet(inputMBDS, outputMBDS, &mb_offset);
......@@ -619,11 +620,8 @@ int vtkRedistributeDataSetFilter::RedistributeMultiBlockDataSet(
}
else
{
// It's okay for inputDS to be null. Redistribute() should appropriately handle this.
auto inputDS = vtkDataSet::SafeDownCast(in_block);
if (!inputDS)
{
inputDS = vtkUnstructuredGrid::New();
}
vtkNew<vtkPartitionedDataSet> parts;
if (!this->Redistribute(inputDS, parts, this->Cuts, mb_offset))
......
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