summaryrefslogtreecommitdiff
path: root/src/transports/smart.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transports/smart.c')
-rw-r--r--src/transports/smart.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/transports/smart.c b/src/transports/smart.c
index 5fedd394e..b49e76ee9 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;
}