From 8377d95fbd027c763706688fe9a9be6682b94cbc Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 25 Jun 2010 17:01:33 +0200 Subject: [PATCH] isl_basic_map_cow: check result of allocation --- isl_map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isl_map.c b/isl_map.c index 07b1e991..186dc77f 100644 --- a/isl_map.c +++ b/isl_map.c @@ -1088,7 +1088,8 @@ struct isl_basic_map *isl_basic_map_cow(struct isl_basic_map *bmap) bmap->ref--; bmap = isl_basic_map_dup(bmap); } - ISL_F_CLR(bmap, ISL_BASIC_SET_FINAL); + if (bmap) + ISL_F_CLR(bmap, ISL_BASIC_SET_FINAL); return bmap; } -- 2.11.4.GIT