fix memory leak in fmpz_gcdinv