From 9909ea4ca9891e2cadda809ab3490bb0047a9c01 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 9 Mar 2009 13:22:45 +0100 Subject: [PATCH] isl_constraint_div: perform required reference increase on basic map Both divs and constraints own their contained basic maps, so we can't just steal the basic map from the constraint. --- isl_constraint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isl_constraint.c b/isl_constraint.c index 5c24da22..c7c455ec 100644 --- a/isl_constraint.c +++ b/isl_constraint.c @@ -263,7 +263,8 @@ struct isl_div *isl_constraint_div(struct isl_constraint *constraint, int pos) isl_assert(constraint->ctx, pos < n(constraint, isl_dim_div), return NULL); - return isl_basic_map_div(constraint->bmap, constraint->bmap->div+pos); + return isl_basic_map_div(isl_basic_map_copy(constraint->bmap), + constraint->bmap->div+pos); } void isl_constraint_set_constant(struct isl_constraint *constraint, isl_int v) -- 2.11.4.GIT