isl_basic_map_overlying_set: fix possible NULL access
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 18 Sep 2008 18:02:41 +0000 (20:02 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 11 Oct 2008 21:39:20 +0000 (23:39 +0200)
isl_map.c

index 10aac0b..2b23e03 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -2045,9 +2045,9 @@ struct isl_basic_map *isl_basic_map_overlying_set(
                return (struct isl_basic_map *)bset;
        }
        bset = isl_basic_set_cow(bset);
-       total = bset->dim + bset->extra;
        if (!bset)
                goto error;
+       total = bset->dim + bset->extra;
        bmap = (struct isl_basic_map *)bset;
        bmap->nparam = like->nparam;
        bmap->n_in = like->n_in;