Commit ec2439bf by steven9724 Committed by Edward Thomson

ssh: fix known_hosts leak in _git_ssh_setup_conn

parent 86a4a265
......@@ -877,11 +877,12 @@ static int _git_ssh_setup_conn(
t->current_stream = s;
done:
if (known_hosts)
libssh2_knownhost_free(known_hosts);
if (error < 0) {
ssh_stream_free(*stream);
if (known_hosts)
libssh2_knownhost_free(known_hosts);
if (session)
libssh2_session_free(session);
}
......
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