summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2013-07-05 19:15:19 +0200
committerSven Verdoolaege <skimo@kotnet.org>2013-07-05 19:15:19 +0200
commit74bf895939e1169eb613a42b7f3cb370e7639965 (patch)
tree6de19532f22420cdec31697d851793598f6b9008
parent82ff73cde9a5f34bb68f002804ce6623575bfe35 (diff)
downloadisl-74bf895939e1169eb613a42b7f3cb370e7639965.tar.gz
isl-74bf895939e1169eb613a42b7f3cb370e7639965.tar.bz2
isl-74bf895939e1169eb613a42b7f3cb370e7639965.zip
isl_schedule.c: construct_forest: with_merged_divs: accept NULL pointer on zero-size allocation
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
-rw-r--r--isl_schedule.c2
1 files changed, 1 insertions, 1 deletions
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)