libssh: avoid plain free() of libssh-memory

Since curl's own memory debugging system redefines free() calls to track
and fiddle with memory, it cannot be used on memory allocated by 3rd
party libraries.

Third party libraries SHOULD NOT require free() to release allocated
resources for this reason - and libs can use separate healp allocators
on some systems (like Windows) so free() doesn't necessarily work
anyway.

Filed as an issue with libssh: https://bugs.libssh.org/T268

Closes #6481
This commit is contained in:
Daniel Stenberg 2021-01-18 16:40:39 +01:00
parent 2bf77b3cba
commit a3efced012
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 2 additions and 2 deletions

View File

@ -532,10 +532,10 @@ static int myssh_is_known(struct connectdata *conn)
cleanup:
if(found_base64) {
free(found_base64);
(free)(found_base64);
}
if(known_base64) {
free(known_base64);
(free)(known_base64);
}
if(hash)
ssh_clean_pubkey_hash(&hash);