From: Sven Verdoolaege Date: Sun, 2 Dec 2012 14:38:13 +0000 (+0100) Subject: isl_basic_map_foreach_lexopt: avoid invalid access on error X-Git-Tag: isl-0.11~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80bc38a288cc2ae7dd05424f4b09ea396ce402a0;p=platform%2Fupstream%2Fisl.git isl_basic_map_foreach_lexopt: avoid invalid access on error Signed-off-by: Sven Verdoolaege --- diff --git a/isl_tab_pip.c b/isl_tab_pip.c index f69bae3..9663979 100644 --- a/isl_tab_pip.c +++ b/isl_tab_pip.c @@ -4784,11 +4784,13 @@ int isl_basic_map_foreach_lexopt(__isl_keep isl_basic_map *bmap, int max, struct isl_sol_for *sol_for = NULL; bmap = isl_basic_map_copy(bmap); + bmap = isl_basic_map_detect_equalities(bmap); if (!bmap) return -1; - bmap = isl_basic_map_detect_equalities(bmap); sol_for = sol_for_init(bmap, max, fn, user); + if (!sol_for) + goto error; if (isl_basic_map_plain_is_empty(bmap)) /* nothing */;