Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-07-20 23:50:58 +0300
committerPatrick Steinhardt <ps@pks.im>2018-10-26 15:35:16 +0300
commit49ee0ae6ff1621d3093947c08868f4a4aeb56a91 (patch)
treee2c8c97e9fa95f1466186bc3f976aa99cad44c94
parent67182a2452c5b7613413360aefd2d315b7fd5046 (diff)
smart subtransport: free url when resetting stream
Free the url field when resetting the stream to avoid leaking it. (cherry picked from commit ca2eb4608243162a13c427e74526b6422d5a6659)
-rw-r--r--src/transports/smart.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/transports/smart.c b/src/transports/smart.c
index a96fdf6fb..5cf107dd9 100644
--- a/src/transports/smart.c
+++ b/src/transports/smart.c
@@ -43,6 +43,11 @@ GIT_INLINE(int) git_smart__reset_stream(transport_smart *t, bool close_subtransp
t->current_stream = NULL;
}
+ if (t->url) {
+ git__free(t->url);
+ t->url = NULL;
+ }
+
if (close_subtransport &&
t->wrapped->close(t->wrapped) < 0)
return -1;