isl_mat_variable_compression: fix use after free
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 27 Jan 2009 08:52:04 +0000 (09:52 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 4 Feb 2009 11:36:49 +0000 (12:36 +0100)
isl_equalities.c

index 1f0c698..85ade34 100644 (file)
@@ -302,7 +302,7 @@ struct isl_mat *isl_mat_variable_compression(struct isl_ctx *ctx,
                                        isl_mat_free(ctx, *T2);
                                        *T2 = NULL;
                                }
-                               return isl_mat_alloc(ctx, 1 + B->n_col, 0);
+                               return isl_mat_alloc(ctx, 1 + dim, 0);
                        }
                        isl_seq_scale_down(TC->row[1+i], TC->row[1+i], TC->row[0][0], 1);
                }