summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-03-21 21:48:03 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2015-03-21 21:49:27 +0100
commit2a0f67f04cb717a7e57192696d69f91a3d208705 (patch)
treeff2dee8e440ff8a56c9754557a14727ba48ad529
parenta3f693e9a1d2dae093c08f54103e336e52ab7eba (diff)
downloadlibgit2-2a0f67f04cb717a7e57192696d69f91a3d208705.tar.gz
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.
-rw-r--r--src/transports/git.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/transports/git.c b/src/transports/git.c
index 5ec98d867..726712dff 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);