mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-21 14:00:51 +03:00
session_free: free more data to avoid memory leaks
This commit is contained in:
committed by
Daniel Stenberg
parent
c375e5e5ad
commit
ef4c8718c2
@@ -1133,6 +1133,9 @@ static int kexinit(LIBSSH2_SESSION * session)
|
||||
} else {
|
||||
data = session->kexinit_data;
|
||||
data_len = session->kexinit_data_len;
|
||||
/* zap the variables to ensure there is NOT a double free later */
|
||||
session->kexinit_data = NULL;
|
||||
session->kexinit_data_len = 0;
|
||||
}
|
||||
|
||||
rc = _libssh2_transport_write(session, data, data_len);
|
||||
|
||||
Reference in New Issue
Block a user