Describe the bug
The SFTP session releases the ssh_channel on the SSHFS process, but it never frees it. Ownership is transferred but not properly adopted. Libssh's sftp_server_new doesn't transfer ownership and sftp_server_free does not free the channel.
|
sftp_server_session{make_sftp_session(ssh_session, sshfs_process->release_channel())}, |
|
mp::SftpServer::SftpSessionUptr sftp_server_session{sftp_server_new(session, channel), |
|
sftp_server_free}; |
Describe the bug
The SFTP session releases the ssh_channel on the SSHFS process, but it never frees it. Ownership is transferred but not properly adopted. Libssh's
sftp_server_newdoesn't transfer ownership andsftp_server_freedoes not free the channel.multipass/src/sshfs_mount/sftp_server.cpp
Line 313 in f4542c3
multipass/src/sshfs_mount/sftp_server.cpp
Lines 65 to 66 in f4542c3