isl_basic_map_project_out: avoid NULL pointer dereference
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 26 Jun 2010 09:41:56 +0000 (11:41 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 26 Jun 2010 15:37:40 +0000 (17:37 +0200)
isl_map.c

index 9d532cd..ba05d12 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -2396,6 +2396,8 @@ __isl_give isl_basic_map *isl_basic_map_project_out(
 
        bmap = move_last(bmap, type, first, n);
        bmap = isl_basic_map_cow(bmap);
+       if (!bmap)
+               return NULL;
 
        row_size = 1 + isl_dim_total(bmap->dim) + bmap->extra;
        old = bmap->block2.data;