isl_basic_map_uncurry: add missing isl_basic_map_cow
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 27 Feb 2013 13:42:50 +0000 (27 14:42 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 28 Feb 2013 16:12:37 +0000 (28 17:12 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map.c

index 085bbb4..b833b98 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -10470,6 +10470,9 @@ __isl_give isl_basic_map *isl_basic_map_uncurry(__isl_take isl_basic_map *bmap)
                isl_die(bmap->ctx, isl_error_invalid,
                        "basic map cannot be uncurried",
                        return isl_basic_map_free(bmap));
+       bmap = isl_basic_map_cow(bmap);
+       if (!bmap)
+               return NULL;
        bmap->dim = isl_space_uncurry(bmap->dim);
        if (!bmap->dim)
                return isl_basic_map_free(bmap);