From: Sven Verdoolaege Date: Sat, 26 Jun 2010 08:57:40 +0000 (+0200) Subject: isl_affine_hull.c: equalities_in_underlying_set: avoid NULL pointer dereference X-Git-Tag: isl-0.03~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd7bdc07b433649f04ef1f72ffa53da4beb1e0c0;p=platform%2Fupstream%2Fisl.git isl_affine_hull.c: equalities_in_underlying_set: avoid NULL pointer dereference --- 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;