Avoid a mpz_clear just to mpz_init by reusing p variable