mirror of
https://github.com/moparisthebest/curl
synced 2025-01-08 20:38:18 -05:00
blocked new stuff with HAVE_LIBSSH2_KNOWNHOST_API to check if this is our current memory leak.
This commit is contained in:
parent
8570883412
commit
7dc48e57a6
@ -4694,16 +4694,19 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
my_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
my_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||||
my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
|
my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_LIBSSH2_KNOWNHOST_API
|
||||||
else {
|
else {
|
||||||
char *home = homedir();
|
char *home = homedir();
|
||||||
char *file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR);
|
char *file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR);
|
||||||
if(home && file) {
|
if(home && file) {
|
||||||
free(home);
|
free(home);
|
||||||
my_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
|
my_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
|
||||||
|
/* XXX do we need to free file here? */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(config->no_body || config->remote_time) {
|
if(config->no_body || config->remote_time) {
|
||||||
/* no body or use remote time */
|
/* no body or use remote time */
|
||||||
|
Loading…
Reference in New Issue
Block a user