From: Sven Verdoolaege Date: Wed, 18 Apr 2012 08:46:20 +0000 (+0200) Subject: isl_local_space_alloc_div: fix error handling X-Git-Tag: isl-0.10~8^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5267d53ffcc639b1f332acc8de36ec537ab6d86;hp=3f5dad44850a76f19e59ad126ae66bfef55d5e3f;p=platform%2Fupstream%2Fisl.git isl_local_space_alloc_div: fix error handling Signed-off-by: Sven Verdoolaege --- diff --git a/isl_local_space.c b/isl_local_space.c index a57fff1..19ae702 100644 --- a/isl_local_space.c +++ b/isl_local_space.c @@ -27,7 +27,7 @@ __isl_give isl_local_space *isl_local_space_alloc_div(__isl_take isl_space *dim, isl_ctx *ctx; isl_local_space *ls = NULL; - if (!dim) + if (!dim || !div) goto error; ctx = isl_space_get_ctx(dim); @@ -41,6 +41,7 @@ __isl_give isl_local_space *isl_local_space_alloc_div(__isl_take isl_space *dim, return ls; error: + isl_mat_free(div); isl_space_free(dim); isl_local_space_free(ls); return NULL;