X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_pw_templ.c;h=39939740247bbf4587ec83d5282c53c383a35511;hb=6ef5393d0c0b4b08b7316769b18e2ae92cd3cbcc;hp=394571d7e575f7009aa80cfcd5df0888423c1f1e;hpb=72c384679066d8c6236d2b514c3536a72c013dfd;p=platform%2Fupstream%2Fisl.git diff --git a/isl_pw_templ.c b/isl_pw_templ.c index 394571d..3993974 100644 --- a/isl_pw_templ.c +++ b/isl_pw_templ.c @@ -538,9 +538,9 @@ static __isl_give PW *FN(PW,on_shared_domain_in)(__isl_take PW *pw1, n = pw1->n * pw2->n; #ifdef HAS_TYPE - res = FN(PW,alloc_size)(space, pw1->type, n); + res = FN(PW,alloc_size)(isl_space_copy(space), pw1->type, n); #else - res = FN(PW,alloc_size)(space, n); + res = FN(PW,alloc_size)(isl_space_copy(space), n); #endif for (i = 0; i < pw1->n; ++i) { @@ -568,6 +568,7 @@ static __isl_give PW *FN(PW,on_shared_domain_in)(__isl_take PW *pw1, } } + isl_space_free(space); FN(PW,free)(pw1); FN(PW,free)(pw2); return res; @@ -982,12 +983,14 @@ __isl_give PW *FN(PW,drop_dims)(__isl_take PW *pw, if (!pw->dim) goto error; for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_drop(pw->p[i].set, set_type, first, n); - if (!pw->p[i].set) - goto error; pw->p[i].FIELD = FN(EL,drop_dims)(pw->p[i].FIELD, type, first, n); if (!pw->p[i].FIELD) goto error; + if (type == isl_dim_out) + continue; + pw->p[i].set = isl_set_drop(pw->p[i].set, set_type, first, n); + if (!pw->p[i].set) + goto error; } return pw;