Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
22595b84
Commit
22595b84
authored
May 05, 2013
by
Brad Morgan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ssh stream cleanup
parent
58ba0a4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
src/transports/ssh.c
+10
-1
No files found.
src/transports/ssh.c
View file @
22595b84
...
@@ -97,7 +97,6 @@ static int ssh_stream_read(
...
@@ -97,7 +97,6 @@ static int ssh_stream_read(
return
-
1
;
return
-
1
;
int
rc
=
libssh2_channel_read
(
s
->
channel
,
buffer
,
buf_size
);
int
rc
=
libssh2_channel_read
(
s
->
channel
,
buffer
,
buf_size
);
if
(
rc
<
0
)
if
(
rc
<
0
)
return
-
1
;
return
-
1
;
...
@@ -134,6 +133,16 @@ static void ssh_stream_free(git_smart_subtransport_stream *stream)
...
@@ -134,6 +133,16 @@ static void ssh_stream_free(git_smart_subtransport_stream *stream)
t
->
current_stream
=
NULL
;
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
)
{
if
(
s
->
socket
.
socket
)
{
ret
=
gitno_close
(
&
s
->
socket
);
ret
=
gitno_close
(
&
s
->
socket
);
assert
(
!
ret
);
assert
(
!
ret
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment