isl_schedule.c: add_inter_validity_constraints: avoid invalid access on error
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 2 Dec 2012 20:56:45 +0000 (2 21:56 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 2 Dec 2012 20:56:45 +0000 (2 21:56 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_schedule.c

index b86329b..ec314cf 100644 (file)
@@ -887,6 +887,8 @@ static int add_inter_validity_constraints(struct isl_sched_graph *graph,
                        coef->n_eq, coef->n_ineq);
        graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp,
                                                           coef, dim_map);
+       if (!graph->lp)
+               goto error;
        isl_space_free(dim);
        edge->end = graph->lp->n_ineq;