From bd50ecefab3a64580f36df10e30d9032c40070cc Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 25 Jun 2010 19:42:23 +0200 Subject: [PATCH] isl_map_subtract.c: tab_add_constraints: avoid NULL pointer dereference --- isl_map_subtract.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isl_map_subtract.c b/isl_map_subtract.c index 2cbdb01..53664c5 100644 --- a/isl_map_subtract.c +++ b/isl_map_subtract.c @@ -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); -- 2.7.4