isl_basic_map_eliminate_vars: avoid NULL pointer dereference
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 25 Jun 2010 16:44:36 +0000 (18:44 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 26 Jun 2010 15:37:39 +0000 (17:37 +0200)
isl_map_simplify.c

index 7326f3a..5327cc8 100644 (file)
@@ -1287,6 +1287,8 @@ struct isl_basic_map *isl_basic_map_eliminate_vars(
                }
                bmap = isl_basic_map_extend_constraints(bmap,
                                0, n_lower * n_upper);
+               if (!bmap)
+                       goto error;
                for (i = bmap->n_ineq - 1; i >= 0; --i) {
                        int last;
                        if (isl_int_is_zero(bmap->ineq[i][1+d]))