Properly free the client object.