Skip to content

Commit 09e61e0

Browse files
committed
Merge remote-tracking branch 'origin/v10-minor'
2 parents ecc92b5 + 5bc24f6 commit 09e61e0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ Fixed bugs
514514
- track and check bounds on the coefficients that is used for a variable in aggregations of other variables to improve numerical stability
515515
- corrected the upgrade of full orbitopes to packing/partitioning orbotopes in case the orbitopal symmetries form a proper subgroup of a component's symmetry group
516516
- aggregate integer variable to not in clique variable in cliquePresolve() of cons_xor.c to avoid infeasible solutions
517+
- fixed memory leak in dynamic partition search primal heuristic
517518

518519
Miscellaneous
519520
-------------

src/scip/heur_dps.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -947,11 +947,18 @@ SCIP_RETCODE initCurrent(
947947
if( origvar == NULL ) /* e.g. variable is negated */
948948
{
949949
*success = FALSE;
950-
return SCIP_OKAY;
950+
break;
951951
}
952952
varlpvalue = SCIPvarGetLPSol(origvar);
953953
lpvalue += varlpvalue * consvals[i];
954954
}
955+
956+
SCIPfreeBufferArray(scip, &consvals);
957+
SCIPfreeBufferArray(scip, &consvars);
958+
959+
if( !*success )
960+
return SCIP_OKAY;
961+
955962
sumrhs += lpvalue;
956963
sumlhs += lpvalue;
957964

@@ -960,9 +967,6 @@ SCIP_RETCODE initCurrent(
960967
linking->currentrhs[b] = lpvalue;
961968
if( linking->haslhs )
962969
linking->currentlhs[b] = lpvalue;
963-
964-
SCIPfreeBufferArray(scip, &consvars);
965-
SCIPfreeBufferArray(scip, &consvals);
966970
}
967971
assert(SCIPisLE(scip, sumrhs, rhs));
968972
assert(SCIPisGE(scip, sumlhs, lhs));

0 commit comments

Comments
 (0)