Use TMP_ALLOC in nmod_poly.