From cd7bdc07b433649f04ef1f72ffa53da4beb1e0c0 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 26 Jun 2010 10:57:40 +0200 Subject: [PATCH] isl_affine_hull.c: equalities_in_underlying_set: avoid NULL pointer dereference --- isl_affine_hull.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/isl_affine_hull.c b/isl_affine_hull.c index 0e8811b..7451fed 100644 --- a/isl_affine_hull.c +++ b/isl_affine_hull.c @@ -821,8 +821,11 @@ static struct isl_basic_set *equalities_in_underlying_set( else isl_mat_free(T1); hull = isl_basic_set_preimage(hull, T2); - isl_vec_free(hull->sample); - hull->sample = sample; + if (hull) { + isl_vec_free(hull->sample); + hull->sample = sample; + } else + isl_vec_free(sample); } return hull; -- 2.7.4