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

index 0e6a3aa..51e9dc0 100644 (file)
@@ -2240,6 +2240,8 @@ static int add_inter_constraints(struct isl_sched_graph *graph,
        struct isl_sched_node *dst = edge->dst;
 
        coef = inter_coefficients(graph, map);
+       if (!coef)
+               return -1;
 
        dim = isl_space_domain(isl_space_unwrap(isl_basic_set_get_space(coef)));