From e5e70d94a1f6b3acd9953b35ac389a0f535d7717 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 5 Jul 2013 19:23:42 +0200 Subject: [PATCH] isl_tab_pip.c: tab_for_lexmin: accept NULL pointer on zero-size allocation Signed-off-by: Sven Verdoolaege --- isl_tab_pip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isl_tab_pip.c b/isl_tab_pip.c index 6e575c1c..9173fd33 100644 --- a/isl_tab_pip.c +++ b/isl_tab_pip.c @@ -2087,7 +2087,7 @@ static struct isl_tab *tab_for_lexmin(struct isl_basic_map *bmap, tab->n_div = dom->n_div; tab->row_sign = isl_calloc_array(bmap->ctx, enum isl_tab_row_sign, tab->mat->n_row); - if (!tab->row_sign) + if (tab->mat->n_row && !tab->row_sign) goto error; } if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) { -- 2.11.4.GIT