From 74bf895939e1169eb613a42b7f3cb370e7639965 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 5 Jul 2013 19:15:19 +0200 Subject: [PATCH] isl_schedule.c: construct_forest: with_merged_divs: accept NULL pointer on zero-size allocation Signed-off-by: Sven Verdoolaege --- isl_schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isl_schedule.c b/isl_schedule.c index 25f194ad..7403692b 100644 --- a/isl_schedule.c +++ b/isl_schedule.c @@ -3487,7 +3487,7 @@ static __isl_give isl_band_list *construct_forest( int *active; active = isl_alloc_array(ctx, int, schedule->n); - if (!active) + if (schedule->n && !active) return NULL; for (i = 0; i < schedule->n; ++i) -- 2.11.4.GIT