Commit 1f726d05d382e7f797e9a77dfec8f4383f1000c1

Carlos Martín Nieto 2015-03-21T21:48:03

git: make sure to close the network stream In case of a bad url or other error during the connection setup, we close the stream via free.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/transports/git.c b/src/transports/git.c
index 6f25736..8ab8091 100644
--- a/src/transports/git.c
+++ b/src/transports/git.c
@@ -136,6 +136,7 @@ static void git_proto_stream_free(git_smart_subtransport_stream *stream)
 
 	t->current_stream = NULL;
 
+	git_stream_close(s->io);
 	git_stream_free(s->io);
 	git__free(s->url);
 	git__free(s);