session_free: remove dead code

This commit is contained in:
Daniel Stenberg
2010-04-24 21:12:09 +02:00
parent 000b0f73d0
commit 5163e4ecb8

View File

@@ -743,24 +743,6 @@ session_free(LIBSSH2_SESSION *session)
rc = libssh2_channel_free(ch); rc = libssh2_channel_free(ch);
if (rc == LIBSSH2_ERROR_EAGAIN) if (rc == LIBSSH2_ERROR_EAGAIN)
return rc; return rc;
#if 0
/* Daniel's note: I'm leaving this code here right now since it
looks so weird I'm stumped. Why would libssh2_channel_free()
fail and forces this to be done? */
if (tmp == session->channels.head) {
/* channel_free couldn't do it's job, perform a messy cleanup */
tmp = session->channels.head;
/* unlink */
session->channels.head = tmp->next;
/* free */
LIBSSH2_FREE(session, tmp);
/* reverse linking isn't important here, we're killing the
* structure */
}
#endif
} }
session->state = libssh2_NB_state_sent; session->state = libssh2_NB_state_sent;