Flynn got fired after he talked to the Russian ambassador.
More accurately, Flynn was fired for lying to VP Pence about meeting with the Russian ambassador, not for merely talking with him.