Commit 5c8c310e authored by Daniel Gustafsson's avatar Daniel Gustafsson
Browse files

ssh: free the session on init failures



Ensure to clear the session object in case the libssh2 initialization
fails.

It could be argued that the libssh2 error function should be called to
get a proper error message in this case. But since the only error path
in libssh2_knownhost_init() is memory a allocation failure it's safest
to avoid since the libssh2 error handling allocates memory.

Closes #3179
Reviewed-by: default avatarDaniel Stenberg <daniel@haxx.se>
parent a0c2779d
Supports Markdown
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