Commit 49ee0ae6 by Edward Thomson Committed by Patrick Steinhardt

smart subtransport: free url when resetting stream

Free the url field when resetting the stream to avoid leaking it.

(cherry picked from commit ca2eb460)
parent 67182a24
...@@ -43,6 +43,11 @@ GIT_INLINE(int) git_smart__reset_stream(transport_smart *t, bool close_subtransp ...@@ -43,6 +43,11 @@ GIT_INLINE(int) git_smart__reset_stream(transport_smart *t, bool close_subtransp
t->current_stream = NULL; t->current_stream = NULL;
} }
if (t->url) {
git__free(t->url);
t->url = NULL;
}
if (close_subtransport && if (close_subtransport &&
t->wrapped->close(t->wrapped) < 0) t->wrapped->close(t->wrapped) < 0)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment