Skip to content
  • Rob Swindell's avatar
    e53f1731
    Remove unnecessary call to DuplicateHandle() in Win32 builds of sbbs_t::init() · e53f1731
    Rob Swindell authored
    The client_socket_dup is overwritten after with the return value of accept(),
    so this was likely a socket/handle leak (since commit 74470573, 17 years ago).
    
    Noticed this only after logging a new error in an SSH connection when this
    call to DuplicateHandle() failed for some reason (WinError 6), but it seems
    like it's been redundant code for a long time now. So just ace it and possibly
    fix a resource leak.
    e53f1731
    Remove unnecessary call to DuplicateHandle() in Win32 builds of sbbs_t::init()
    Rob Swindell authored
    The client_socket_dup is overwritten after with the return value of accept(),
    so this was likely a socket/handle leak (since commit 74470573, 17 years ago).
    
    Noticed this only after logging a new error in an SSH connection when this
    call to DuplicateHandle() failed for some reason (WinError 6), but it seems
    like it's been redundant code for a long time now. So just ace it and possibly
    fix a resource leak.
Loading