From: Daniel Stenberg Date: Mon, 18 Jan 2021 15:40:39 +0000 (+0100) Subject: libssh: avoid plain free() of libssh-memory X-Git-Tag: curl-7_75_0~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3efced012632b3893340507542227686c61e0a4;p=thirdparty%2Fcurl.git 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 --- diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index 70e0ded5e0..3b630bcfab 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -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);