Coverity: Resource leak

This commit is contained in:
wmayer
2020-07-19 11:06:04 +02:00
parent 12670655a9
commit 0b45b11344
4 changed files with 18 additions and 10 deletions

View File

@@ -356,7 +356,9 @@ void SketchAnalysis::makeMissingPointOnPointCoincident(bool onebyone)
c->SecondPos = it->SecondPos;
if(onebyone) {
// addConstraint() creates a clone
sketch->addConstraint(c);
delete c;
solvesketch(status,dofs,true);
@@ -435,7 +437,9 @@ void SketchAnalysis::makeMissingVerticalHorizontal(bool onebyone)
c->SecondPos = it->SecondPos;
if(onebyone) {
// addConstraint() creates a clone
sketch->addConstraint(c);
delete c;
solvesketch(status,dofs,true);
@@ -630,7 +634,9 @@ void SketchAnalysis::makeMissingEquality(bool onebyone)
c->SecondPos = it->SecondPos;
if(onebyone) {
// addConstraint() creates a clone
sketch->addConstraint(c);
delete c;
solvesketch(status,dofs,true);