From 35ef0d0d1467497589551b7ef98e71667a2f7d56 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 7 Jan 2017 18:36:31 +0100 Subject: [PATCH] isl_local_space_intersect: plug memory leak on error path This was missing from 665eaee (isl_local_space_intersect: add missing isl_local_space_cow when divs change, Thu May 1 12:59:40 2014 +0200). Signed-off-by: Sven Verdoolaege --- isl_local_space.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isl_local_space.c b/isl_local_space.c index 9bc8c8de..8e1604be 100644 --- a/isl_local_space.c +++ b/isl_local_space.c @@ -672,7 +672,7 @@ __isl_give isl_local_space *isl_local_space_intersect( isl_ctx *ctx; int *exp1 = NULL; int *exp2 = NULL; - isl_mat *div; + isl_mat *div = NULL; int equal; if (!ls1 || !ls2) @@ -720,6 +720,7 @@ __isl_give isl_local_space *isl_local_space_intersect( error: free(exp1); free(exp2); + isl_mat_free(div); isl_local_space_free(ls1); isl_local_space_free(ls2); return NULL; -- 2.11.4.GIT