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:49 +0100
commit1f726d05d382e7f797e9a77dfec8f4383f1000c1 (patch)
tree0aeace919bad4aba417d989c2362e8d40e128437
parent3e163b6735fd2281f919609d928968af1d9fe39e (diff)
downloadlibgit2-1f726d05d382e7f797e9a77dfec8f4383f1000c1.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 6f25736b1..8ab809117 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);