int isl_tab_extend_cons(struct isl_tab *tab, unsigned n_new)
{
- unsigned off = 2 + tab->M;
+ unsigned off;
if (!tab)
return -1;
+ off = 2 + tab->M;
+
if (tab->max_con < tab->n_con + n_new) {
struct isl_tab_var *con;
prod = isl_mat_alloc(mat1->ctx, mat1->n_row + mat2->n_row,
off + col1 + col2);
+ if (!prod)
+ return NULL;
n = 0;
for (i = 0; i < r1; ++i) {
if (undo == snap)
break;
if (perform_undo(tab, undo) < 0) {
+ tab->top = undo;
free_undo(tab);
tab->in_undo = 0;
return -1;