X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_tab_pip.c;h=2592a285c0e179164254439f4b2c0e0d84bd12ed;hb=da1dc20cb7aa4509e375f703c35beaf27dfa4a15;hp=cce84182790b9530f99f95bb76027a11ffd4145d;hpb=db282322bea9eb89e9141849a430c32fcb94ad58;p=platform%2Fupstream%2Fisl.git diff --git a/isl_tab_pip.c b/isl_tab_pip.c index cce8418..2592a28 100644 --- a/isl_tab_pip.c +++ b/isl_tab_pip.c @@ -124,6 +124,8 @@ struct isl_context_lex { * "M" describes the solution in terms of the dimensions of "dom". * The number of columns of "M" is one more than the total number * of dimensions of "dom". + * + * If "M" is NULL, then there is no solution on "dom". */ struct isl_partial_sol { int level; @@ -322,11 +324,15 @@ static void sol_pop(struct isl_sol *sol) isl_basic_set_free(partial->next->dom); partial->next->dom = bset; M = partial->next->M; - M = isl_mat_drop_cols(M, M->n_col - n, n); - partial->next->M = M; + if (M) { + M = isl_mat_drop_cols(M, M->n_col - n, n); + partial->next->M = M; + if (!M) + goto error; + } partial->next->level = sol->level; - if (!bset || !M) + if (!bset) goto error; sol->partial = partial->next;