isl_schedule.c: add_intra_constraints: avoid invalid access on error
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 3 Dec 2012 12:37:42 +0000 (3 13:37 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 3 Dec 2012 12:37:42 +0000 (3 13:37 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_schedule.c

index ec314cf..0e6a3aa 100644 (file)
@@ -2190,6 +2190,8 @@ static int add_intra_constraints(struct isl_sched_graph *graph,
        struct isl_sched_node *node = edge->src;
 
        coef = intra_coefficients(graph, map);
+       if (!coef)
+               return -1;
 
        dim = isl_space_domain(isl_space_unwrap(isl_basic_set_get_space(coef)));