critical bug fix: access after delete

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
pull/1/head
Thorsten Liebig 2012-10-29 14:51:02 +01:00
parent af5063abc1
commit 211e7170e4
3 changed files with 3 additions and 3 deletions

View File

@ -310,7 +310,7 @@ void Operator_Cylinder::AddExtension(Operator_Extension* op_ext)
Operator_Multithread::AddExtension(op_ext); Operator_Multithread::AddExtension(op_ext);
else else
{ {
delete op_ext;
cerr << "Operator_Cylinder::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylinder-coords!! skipping...!" << endl; cerr << "Operator_Cylinder::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylinder-coords!! skipping...!" << endl;
delete op_ext;
} }
} }

View File

@ -498,8 +498,8 @@ void Operator_CylinderMultiGrid::AddExtension(Operator_Extension* op_ext)
//check whether extension is save to use in multi-grid //check whether extension is save to use in multi-grid
if (op_ext->IsCylindricalMultiGridSave(false)==false) if (op_ext->IsCylindricalMultiGridSave(false)==false)
{ {
delete op_ext;
cerr << "Operator_CylinderMultiGrid::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylindrical multi-grids!! skipping...!" << endl; cerr << "Operator_CylinderMultiGrid::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylindrical multi-grids!! skipping...!" << endl;
delete op_ext;
return; return;
} }

View File

@ -173,8 +173,8 @@ void Operator_MPI::AddExtension(Operator_Extension* op_ext)
Operator_SSE_Compressed::AddExtension(op_ext); Operator_SSE_Compressed::AddExtension(op_ext);
else else
{ {
delete op_ext;
cerr << "Operator_MPI::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with MPI!! skipping...!" << endl; cerr << "Operator_MPI::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with MPI!! skipping...!" << endl;
delete op_ext;
} }
} }