From 4c8d127e1acff7f670d86863addcde96eadf711a Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 17 Nov 2012 13:28:18 +0100 Subject: [PATCH] isl_affine_hull.c: affine_hull_with_cone: plug memory leak on error path Signed-off-by: Sven Verdoolaege --- isl_affine_hull.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/isl_affine_hull.c b/isl_affine_hull.c index d3d3b7de..b6417638 100644 --- a/isl_affine_hull.c +++ b/isl_affine_hull.c @@ -940,9 +940,10 @@ static struct isl_basic_set *affine_hull_with_cone(struct isl_basic_set *bset, hull = uset_affine_hull_bounded(bset); - if (!hull) + if (!hull) { + isl_mat_free(Q); isl_mat_free(U); - else { + } else { struct isl_vec *sample = isl_vec_copy(hull->sample); U = isl_mat_drop_cols(U, 1 + total - cone_dim, cone_dim); if (sample && sample->size > 0) -- 2.11.4.GIT