Agent NULL check in shutdown
@@ -223,8 +223,10 @@ int main(int argc, char *argv[])
shutdown:
+ if (agent) {
libssh2_agent_disconnect(agent);
libssh2_agent_free(agent);
+ }
if(session) {
libssh2_session_disconnect(session,
