diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-07-20 21:50:58 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-09-22 19:15:48 +1000 |
commit | 54772a4fea1ade322b7df3baff1cec1cc0ebbde4 (patch) | |
tree | 726ceeec20c6017bab04c0c5fff707b888ee1656 | |
parent | 6c59fc74a672c13b230f5350dbfa754efe8f9e5c (diff) | |
download | libgit2-54772a4fea1ade322b7df3baff1cec1cc0ebbde4.tar.gz |
smart subtransport: free url when resetting stream
Free the url field when resetting the stream to avoid leaking it.
-rw-r--r-- | src/transports/smart.c | 5 |
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; |