Removed a few memory leaks when a connection could not be established. Fixed a possible dereference of a NULL pointer in ros_login.