From 00b8a18ff9ba5f3d10bdb5518e422ec21c8ca051 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 5 Jul 2013 18:08:08 +0200 Subject: [PATCH] isl_flow.c: compute_flow: accept NULL pointer on zero-size allocation Signed-off-by: Sven Verdoolaege --- isl_flow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isl_flow.c b/isl_flow.c index 90e2db83..d75be312 100644 --- a/isl_flow.c +++ b/isl_flow.c @@ -1319,7 +1319,8 @@ static int compute_flow(__isl_take isl_map *map, void *user) data->accesses = isl_access_info_alloc(isl_map_copy(map), data->sink_info, &before, data->count); - if (!data->sink_info || !data->source_info || !data->accesses) + if (!data->sink_info || (data->count && !data->source_info) || + !data->accesses) goto error; data->count = 0; data->must = 1; -- 2.11.4.GIT