isl_affine_hull.c: affine_hull_with_cone: plug memory leak on error path
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 17 Nov 2012 12:28:18 +0000 (13:28 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 20 Nov 2012 11:37:45 +0000 (12:37 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_affine_hull.c

index d3d3b7d..b641763 100644 (file)
@@ -940,9 +940,10 @@ static struct isl_basic_set *affine_hull_with_cone(struct isl_basic_set *bset,
 
        hull = uset_affine_hull_bounded(bset);
 
-       if (!hull)
+       if (!hull) {
+               isl_mat_free(Q);
                isl_mat_free(U);
-       else {
+       else {
                struct isl_vec *sample = isl_vec_copy(hull->sample);
                U = isl_mat_drop_cols(U, 1 + total - cone_dim, cone_dim);
                if (sample && sample->size > 0)