summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-01-18 16:40:39 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-18 16:40:39 +0100
commit53e2493ea524e3afbb0a7b733a0d18765ca432b0 (patch)
tree559c37332b7ae1acd8da49699e62eee3ee626ac9
parent2bf77b3cbaa15b05f0b946ab6fb0976d0ec29001 (diff)
downloadcurl-bagder/libssh-free.tar.gz
libssh: avoid plain free() of libssh-memorybagder/libssh-free
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
-rw-r--r--lib/vssh/libssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c
index 70e0ded5e..3b630bcfa 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);