diff options
-rw-r--r-- | src/transports/smart.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/transports/smart.c b/src/transports/smart.c index a9459c433..e972d30ba 100644 --- a/src/transports/smart.c +++ b/src/transports/smart.c @@ -45,14 +45,13 @@ GIT_INLINE(int) git_smart__reset_stream(transport_smart *t, bool close_subtransp t->current_stream = NULL; } - if (t->url) { + if (close_subtransport) { git__free(t->url); t->url = NULL; - } - if (close_subtransport && - t->wrapped->close(t->wrapped) < 0) - return -1; + if (t->wrapped->close(t->wrapped) < 0) + return -1; + } return 0; } |