Commit 22595b84 by Brad Morgan

Added ssh stream cleanup

parent 58ba0a4e
......@@ -97,7 +97,6 @@ static int ssh_stream_read(
return -1;
int rc = libssh2_channel_read(s->channel, buffer, buf_size);
if (rc < 0)
return -1;
......@@ -134,6 +133,16 @@ static void ssh_stream_free(git_smart_subtransport_stream *stream)
t->current_stream = NULL;
if (s->channel) {
libssh2_channel_close(s->channel);
libssh2_channel_free(s->channel);
s->channel = NULL;
}
if (s->session) {
libssh2_session_free(s->session), s->session = NULL;
}
if (s->socket.socket) {
ret = gitno_close(&s->socket);
assert(!ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment