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

index cf3cfbf..362c378 100644 (file)
@@ -1901,6 +1901,8 @@ struct isl_basic_map *isl_map_convex_hull(struct isl_map *map)
        }
 
        convex_hull = isl_basic_map_overlying_set(bset, model);
+       if (!convex_hull)
+               return NULL;
 
        ISL_F_SET(convex_hull, ISL_BASIC_MAP_NO_IMPLICIT);
        ISL_F_SET(convex_hull, ISL_BASIC_MAP_ALL_EQUALITIES);