From c1f805bb0ed54dd712e04b666bb8f40407ee936c Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 25 Jun 2010 20:53:12 +0200 Subject: [PATCH] isl_basic_map_intersect_domain: avoid NULL pointer dereference --- isl_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/isl_map.c b/isl_map.c index dd438b65..b7cbebef 100644 --- a/isl_map.c +++ b/isl_map.c @@ -1776,10 +1776,10 @@ struct isl_basic_map *isl_basic_map_intersect_domain( isl_basic_map_compatible_domain(bmap, bset), goto error); bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_extend_dim(bmap, isl_dim_copy(bmap->dim), - bset->n_div, bset->n_eq, bset->n_ineq); if (!bmap) goto error; + bmap = isl_basic_map_extend_dim(bmap, isl_dim_copy(bmap->dim), + bset->n_div, bset->n_eq, bset->n_ineq); dim = isl_dim_reverse(isl_dim_copy(bset->dim)); bmap_domain = isl_basic_map_from_basic_set(bset, dim); bmap = add_constraints(bmap, bmap_domain, 0, 0); -- 2.11.4.GIT