From 4827c653873ff81f5d42625873dc36a944c46538 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 4 Oct 2010 00:35:23 +0200 Subject: [PATCH] isl_dim_replace: call isl_dim_cow before changing isl_dim Signed-off-by: Sven Verdoolaege --- isl_dim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isl_dim.c b/isl_dim.c index 2002fb6..d198fa5 100644 --- a/isl_dim.c +++ b/isl_dim.c @@ -1098,6 +1098,8 @@ __isl_give isl_dim *isl_dim_flatten(__isl_take isl_dim *dim) __isl_give isl_dim *isl_dim_replace(__isl_take isl_dim *dst, enum isl_dim_type type, __isl_keep isl_dim *src) { + dst = isl_dim_cow(dst); + if (!dst || !src) goto error; -- 2.7.4