You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following in lp_wrapper.c::generate_cuts_in_lp_u() has a memory leak:
/* Test whether any of the new cuts are identical to any of
the old ones. */
if (p->waiting_row_num && new_row_num){
for (i = 0, deleted_cut = FALSE; i < new_row_num;
deleted_cut = FALSE){
for (j = p->waiting_row_num - 1; j >= 0; j--){
if (same_cuts_u(p, p->waiting_rows[j], new_rows[i]) !=
DIFFERENT_CUTS){
free_waiting_row(new_rows+i);
new_rows[i] = new_rows[--new_row_num];
deleted_cut = TRUE;
break;
}
}
if (!deleted_cut) i++;
}
}
/* CNMCNMCNM
leaks memory as if all cuts are the same as previously new_row_num will become 0,
and then new_rows will not be freed. Suggest to move FREE(new_rows) outside of if
statement. /
if (new_row_num){
add_new_rows_to_waiting_rows(p, new_rows, new_row_num);
/ FREE(new_rows); CNM suggest moving free from here /
}
FREE(new_rows); / CNM to here*/
FREE(cuts);
The text was updated successfully, but these errors were encountered:
Issue created by migration from Trac.
Original creator: casper
Original creation time: 2018-10-22 22:55:20
Assignee: @tkralphs
Version: 5.6.16
Keywords: memory leak
The following in lp_wrapper.c::generate_cuts_in_lp_u() has a memory leak:
/* CNMCNMCNM
leaks memory as if all cuts are the same as previously new_row_num will become 0,
and then new_rows will not be freed. Suggest to move FREE(new_rows) outside of if
statement.
/
if (new_row_num){
add_new_rows_to_waiting_rows(p, new_rows, new_row_num);
/ FREE(new_rows); CNM suggest moving free from here /
}
FREE(new_rows); / CNM to here*/
FREE(cuts);
The text was updated successfully, but these errors were encountered: