Skip to content

Commit 2f5f3cf

Browse files
authored
Merge pull request libgit2#4880 from libgit2/ethomson/smart_transport_url
smart transport: only clear url on hard reset (regression)
2 parents fa7aba7 + 9ad9636 commit 2f5f3cf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/transports/smart.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,13 @@ GIT_INLINE(int) git_smart__reset_stream(transport_smart *t, bool close_subtransp
4545
t->current_stream = NULL;
4646
}
4747

48-
if (t->url) {
48+
if (close_subtransport) {
4949
git__free(t->url);
5050
t->url = NULL;
51-
}
5251

53-
if (close_subtransport &&
54-
t->wrapped->close(t->wrapped) < 0)
55-
return -1;
52+
if (t->wrapped->close(t->wrapped) < 0)
53+
return -1;
54+
}
5655

5756
return 0;
5857
}

0 commit comments

Comments
 (0)