session.c: check return value of session_nonblock in debug mode
Reported by Coverity CID 89805.
This commit is contained in:
parent
22204c4e2e
commit
d1eccb487a
@ -1040,9 +1040,14 @@ session_free(LIBSSH2_SESSION *session)
|
|||||||
_libssh2_debug(session, LIBSSH2_TRACE_TRANS,
|
_libssh2_debug(session, LIBSSH2_TRACE_TRANS,
|
||||||
"Extra packets left %d", packets_left);
|
"Extra packets left %d", packets_left);
|
||||||
|
|
||||||
if(session->socket_prev_blockstate)
|
if(session->socket_prev_blockstate) {
|
||||||
/* if the socket was previously blocking, put it back so */
|
/* if the socket was previously blocking, put it back so */
|
||||||
session_nonblock(session->socket_fd, 0);
|
rc = session_nonblock(session->socket_fd, 0);
|
||||||
|
if (rc) {
|
||||||
|
_libssh2_debug(session, LIBSSH2_TRACE_TRANS,
|
||||||
|
"unable to reset socket's blocking state");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (session->server_hostkey) {
|
if (session->server_hostkey) {
|
||||||
LIBSSH2_FREE(session, session->server_hostkey);
|
LIBSSH2_FREE(session, session->server_hostkey);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user