Cleanup memory leak in ssh transport