mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:53:39 +03:00
libssh2: remove use of 'initialised' for cleanup
It could previously cause a memory-leak when the cleanup was not performed because it was not set. Reported-by: albrechtd on github Fixes #17819 Closes #17837
This commit is contained in:
parent
22bd59fb7f
commit
f048546c87
2 changed files with 94 additions and 96 deletions
|
|
@ -191,6 +191,7 @@ struct ssh_conn {
|
|||
const char *readdir_filename; /* points within readdir_attrs */
|
||||
const char *readdir_longentry;
|
||||
char *readdir_tmp;
|
||||
BIT(initialised);
|
||||
#elif defined(USE_LIBSSH2)
|
||||
LIBSSH2_SESSION *ssh_session; /* Secure Shell session */
|
||||
LIBSSH2_CHANNEL *ssh_channel; /* Secure Shell channel handle */
|
||||
|
|
@ -214,8 +215,8 @@ struct ssh_conn {
|
|||
word32 handleSz;
|
||||
byte handle[WOLFSSH_MAX_HANDLE];
|
||||
curl_off_t offset;
|
||||
#endif /* USE_LIBSSH */
|
||||
BIT(initialised);
|
||||
#endif /* USE_LIBSSH */
|
||||
BIT(authed); /* the connection has been authenticated fine */
|
||||
BIT(acceptfail); /* used by the SFTP_QUOTE (continue if
|
||||
quote command fails) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue