Fix memory leak in forprimes.  Document it.