Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 45d295e

Browse files
committed
git: accept NULL as argument to its stream free
1 parent fd74bd0 commit 45d295e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/transports/git.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ static void git_proto_stream_free(git_smart_subtransport_stream *stream)
132132
{
133133
git_proto_stream *s = (git_proto_stream *)stream;
134134
git_subtransport *t = OWNING_SUBTRANSPORT(s);
135-
int ret;
136135

137-
GIT_UNUSED(ret);
136+
if (!stream)
137+
return;
138138

139139
t->current_stream = NULL;
140140

0 commit comments

Comments
 (0)