We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86a4a26 commit ec2439bCopy full SHA for ec2439b
src/libgit2/transports/ssh.c
@@ -877,11 +877,12 @@ static int _git_ssh_setup_conn(
877
t->current_stream = s;
878
879
done:
880
+ if (known_hosts)
881
+ libssh2_knownhost_free(known_hosts);
882
+
883
if (error < 0) {
884
ssh_stream_free(*stream);
885
- if (known_hosts)
- libssh2_knownhost_free(known_hosts);
886
if (session)
887
libssh2_session_free(session);
888
}
0 commit comments