isl_map_subtract.c: tab_add_constraints: avoid NULL pointer dereference
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 25 Jun 2010 17:42:23 +0000 (19:42 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 26 Jun 2010 15:37:39 +0000 (17:37 +0200)
isl_map_subtract.c

index 2cbdb01..53664c5 100644 (file)
@@ -49,6 +49,8 @@ static int tab_add_constraints(struct isl_tab *tab,
                return -1;
 
        v = isl_vec_alloc(bmap->ctx, 1 + tab_total);
+       if (!v)
+               return -1;
 
        for (i = 0; i < bmap->n_eq; ++i) {
                expand_constraint(v, dim, bmap->eq[i], div_map, bmap->n_div);