so I finally caught up with this and I have to say: this show sure has a lot of dirty cops. Looks like it wasn't McNally's fault that he found out sam was undercover. It was the boat.
Sam was lucky that they found him in time and the ending with not knowing how to be normal was nice