Loading lib/ssh.c +9 −8 Original line number Original line Diff line number Diff line Loading @@ -116,9 +116,9 @@ /* Local functions: */ /* Local functions: */ static const char *sftp_libssh2_strerror(unsigned long err); static const char *sftp_libssh2_strerror(unsigned long err); static LIBSSH2_ALLOC_FUNC(libssh2_malloc); static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc); static LIBSSH2_REALLOC_FUNC(libssh2_realloc); static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc); static LIBSSH2_FREE_FUNC(libssh2_free); static LIBSSH2_FREE_FUNC(my_libssh2_free); static CURLcode get_pathname(const char **cpp, char **path); static CURLcode get_pathname(const char **cpp, char **path); Loading Loading @@ -301,19 +301,19 @@ static CURLcode libssh2_session_error_to_CURLE(int err) return CURLE_SSH; return CURLE_SSH; } } static LIBSSH2_ALLOC_FUNC(libssh2_malloc) static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc) { { (void)abstract; /* arg not used */ (void)abstract; /* arg not used */ return malloc(count); return malloc(count); } } static LIBSSH2_REALLOC_FUNC(libssh2_realloc) static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc) { { (void)abstract; /* arg not used */ (void)abstract; /* arg not used */ return realloc(ptr, count); return realloc(ptr, count); } } static LIBSSH2_FREE_FUNC(libssh2_free) static LIBSSH2_FREE_FUNC(my_libssh2_free) { { (void)abstract; /* arg not used */ (void)abstract; /* arg not used */ free(ptr); free(ptr); Loading Loading @@ -2543,8 +2543,9 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done) sock = conn->sock[FIRSTSOCKET]; sock = conn->sock[FIRSTSOCKET]; #endif /* CURL_LIBSSH2_DEBUG */ #endif /* CURL_LIBSSH2_DEBUG */ ssh->ssh_session = libssh2_session_init_ex(libssh2_malloc, libssh2_free, ssh->ssh_session = libssh2_session_init_ex(my_libssh2_malloc, libssh2_realloc, conn); my_libssh2_free, my_libssh2_realloc, conn); if(ssh->ssh_session == NULL) { if(ssh->ssh_session == NULL) { failf(data, "Failure initialising ssh session"); failf(data, "Failure initialising ssh session"); return CURLE_FAILED_INIT; return CURLE_FAILED_INIT; Loading Loading
lib/ssh.c +9 −8 Original line number Original line Diff line number Diff line Loading @@ -116,9 +116,9 @@ /* Local functions: */ /* Local functions: */ static const char *sftp_libssh2_strerror(unsigned long err); static const char *sftp_libssh2_strerror(unsigned long err); static LIBSSH2_ALLOC_FUNC(libssh2_malloc); static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc); static LIBSSH2_REALLOC_FUNC(libssh2_realloc); static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc); static LIBSSH2_FREE_FUNC(libssh2_free); static LIBSSH2_FREE_FUNC(my_libssh2_free); static CURLcode get_pathname(const char **cpp, char **path); static CURLcode get_pathname(const char **cpp, char **path); Loading Loading @@ -301,19 +301,19 @@ static CURLcode libssh2_session_error_to_CURLE(int err) return CURLE_SSH; return CURLE_SSH; } } static LIBSSH2_ALLOC_FUNC(libssh2_malloc) static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc) { { (void)abstract; /* arg not used */ (void)abstract; /* arg not used */ return malloc(count); return malloc(count); } } static LIBSSH2_REALLOC_FUNC(libssh2_realloc) static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc) { { (void)abstract; /* arg not used */ (void)abstract; /* arg not used */ return realloc(ptr, count); return realloc(ptr, count); } } static LIBSSH2_FREE_FUNC(libssh2_free) static LIBSSH2_FREE_FUNC(my_libssh2_free) { { (void)abstract; /* arg not used */ (void)abstract; /* arg not used */ free(ptr); free(ptr); Loading Loading @@ -2543,8 +2543,9 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done) sock = conn->sock[FIRSTSOCKET]; sock = conn->sock[FIRSTSOCKET]; #endif /* CURL_LIBSSH2_DEBUG */ #endif /* CURL_LIBSSH2_DEBUG */ ssh->ssh_session = libssh2_session_init_ex(libssh2_malloc, libssh2_free, ssh->ssh_session = libssh2_session_init_ex(my_libssh2_malloc, libssh2_realloc, conn); my_libssh2_free, my_libssh2_realloc, conn); if(ssh->ssh_session == NULL) { if(ssh->ssh_session == NULL) { failf(data, "Failure initialising ssh session"); failf(data, "Failure initialising ssh session"); return CURLE_FAILED_INIT; return CURLE_FAILED_INIT; Loading