Fix Double Free error
@@ -1333,7 +1333,7 @@ double *pluto_mip_scale_solutions_glpk(glp_prob *ilp)
return scale_sols;
}
-glp_prob* get_scaling_lp_gplk(double* fpsol, int num_sols, double **val, int **index, int npar, int num_ccs)
+glp_prob* get_scaling_lp_glpk(double* fpsol, int num_sols, double **val, int **index, int npar, int num_ccs)
{
int i, num_rows, num_sols_to_be_scaled, col_num;
glp_prob *lp;
@@ -1426,7 +1426,6 @@ int64 *pluto_prog_constraints_lexmin_glpk(const PlutoConstraints *cst,
is_unsat = pluto_constraints_solve_glpk(lp);
if (is_unsat) {
- glp_delete_prob(lp);
return NULL;
}
@@ -1436,7 +1435,7 @@ int64 *pluto_prog_constraints_lexmin_glpk(const PlutoConstraints *cst,
num_sols = glp_get_num_cols (lp);
glp_delete_prob(lp);
- lp = get_scaling_lp_gplk(fpsol, num_sols, val, index, npar, num_ccs);
+ lp = get_scaling_lp_glpk(fpsol, num_sols, val, index, npar, num_ccs);
/* t_mip = rtclock()-t_mip_start; */
/* prog->mipTime += t_mip; */
@@ -1510,7 +1509,6 @@ double* pluto_fcg_constraints_lexmin_glpk(const PlutoConstraints *cst, PlutoMatr
is_unsat = pluto_constraints_solve_glpk(lp);
if (is_unsat) {
- glp_delete_prob(lp);
return NULL;
} else {
sol = get_lp_solution_from_glpk_problem(lp);
