McCain negotiatd special privileges in the Hanoi Hilton. He gave up something. He got something in return.
Yep he gave the enemy everything he knew of future airstrikes, ingress/egress routes, etc