isl_mat_right_inverse: fix memory leak on error path
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 13 Oct 2010 17:39:35 +0000 (19:39 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 13 Oct 2010 17:39:35 +0000 (19:39 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_mat.c

index f425359..1b6be62 100644 (file)
--- a/isl_mat.c
+++ b/isl_mat.c
@@ -856,6 +856,7 @@ struct isl_mat *isl_mat_right_inverse(struct isl_mat *mat)
        return inv;
 error:
        isl_mat_free(mat);
+       isl_mat_free(inv);
        return NULL;
 }