MFC r269197:

Fix potential double free that could happen after connection error.