]> git.ipfire.org Git - thirdparty/curl.git/commit
libssh2:ssh_connect: clear session pointer after free
authorDaniel Stenberg <daniel@haxx.se>
Sat, 20 Mar 2021 23:10:04 +0000 (00:10 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 21 Mar 2021 10:22:08 +0000 (11:22 +0100)
commit012c19c33a57bd821aa433b488deaf7f30e7bb44
treefe10122199ebb22cb3d138532ff2409631eab3ad
parent2e444a17d4ae3976ea69865dd2a63ba0fb40267f
libssh2:ssh_connect: clear session pointer after free

If libssh2_knownhost_init() returns NULL, like in an OOM situation, the
ssh session was freed but the pointer wasn't cleared which made libcurl
later call libssh2 to cleanup using the stale pointer.

Fixes #6764
Closes #6766
lib/vssh/libssh2.c