Fixing a resource leak where on connection failure, the connection would be left...