From: Sven Verdoolaege Date: Fri, 25 Jun 2010 19:50:48 +0000 (+0200) Subject: isl_affine_hull.c: affine_hull: fix erro handling X-Git-Tag: isl-0.03~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4716176d141c1837a91020fffabe172969b7ff5;p=platform%2Fupstream%2Fisl.git isl_affine_hull.c: affine_hull: fix erro handling --- diff --git a/isl_affine_hull.c b/isl_affine_hull.c index df26cf9..8356446 100644 --- a/isl_affine_hull.c +++ b/isl_affine_hull.c @@ -206,6 +206,9 @@ static struct isl_basic_set *affine_hull( int col; int row; + if (!bset1 || !bset2) + goto error; + total = 1 + isl_basic_set_n_dim(bset1); row = 0; @@ -226,12 +229,13 @@ static struct isl_basic_set *affine_hull( --row; } } - isl_basic_set_free(bset2); isl_assert(bset1->ctx, row == bset1->n_eq, goto error); + isl_basic_set_free(bset2); bset1 = isl_basic_set_normalize_constraints(bset1); return bset1; error: isl_basic_set_free(bset1); + isl_basic_set_free(bset2); return NULL; }