From 2f8d92593afe1c6c61b3b5b920e0accbbe7888ca Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 26 Jun 2010 11:45:44 +0200 Subject: [PATCH] isl_equalities.c: parameter_compression_multi: avoid NULL pointer dereference --- isl_equalities.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/isl_equalities.c b/isl_equalities.c index 0e1faa5..60c5e94 100644 --- a/isl_equalities.c +++ b/isl_equalities.c @@ -186,8 +186,12 @@ static struct isl_mat *parameter_compression_multi( A = isl_mat_left_hermite(A, 0, NULL, NULL); T = isl_mat_sub_alloc(A->ctx, A->row, 0, A->n_row, 0, A->n_row); T = isl_mat_lin_to_aff(T); + if (!T) + goto error; isl_int_set(T->row[0][0], D); T = isl_mat_right_inverse(T); + if (!T) + goto error; isl_assert(T->ctx, isl_int_is_one(T->row[0][0]), goto error); T = isl_mat_transpose(T); isl_mat_free(A); -- 2.7.4