mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-28 07:13:54 +09:00
Add torture_server_sftp_opendir_handles_exhaustion test that exercises the error path in process_opendir() when all SFTP handles are occupied. This covers the memory leak fix for h->name that was missing in the sftp_handle_alloc() failure path. The test exhausts all 256 handle slots with sftp_open(), then verifies that sftp_opendir() fails gracefully without crashing or leaking memory. Signed-off-by: Mingyuan Li <2560359315@qq.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>