fix possible memory leak in fmpq_next_minimal