mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-08 08:02:16 -05:00
ITS#6585 don't close invalid sockets
This commit is contained in:
parent
71f062afee
commit
512c7ca273
1 changed files with 7 additions and 4 deletions
|
|
@ -541,7 +541,8 @@ sb_stream_close( Sockbuf_IO_Desc *sbiod )
|
|||
{
|
||||
assert( sbiod != NULL );
|
||||
assert( SOCKBUF_VALID( sbiod->sbiod_sb ) );
|
||||
tcp_close( sbiod->sbiod_sb->sb_fd );
|
||||
if ( sbiod->sbiod_sb->sb_fd != AC_SOCKET_INVALID )
|
||||
tcp_close( sbiod->sbiod_sb->sb_fd );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -754,7 +755,8 @@ sb_fd_close( Sockbuf_IO_Desc *sbiod )
|
|||
assert( sbiod != NULL );
|
||||
assert( SOCKBUF_VALID( sbiod->sbiod_sb ) );
|
||||
|
||||
close( sbiod->sbiod_sb->sb_fd );
|
||||
if ( sbiod->sbiod_sb->sb_fd != AC_SOCKET_INVALID )
|
||||
close( sbiod->sbiod_sb->sb_fd );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -956,8 +958,9 @@ sb_dgram_close( Sockbuf_IO_Desc *sbiod )
|
|||
{
|
||||
assert( sbiod != NULL );
|
||||
assert( SOCKBUF_VALID( sbiod->sbiod_sb ) );
|
||||
|
||||
tcp_close( sbiod->sbiod_sb->sb_fd );
|
||||
|
||||
if ( sbiod->sbiod_sb->sb_fd != AC_SOCKET_INVALID )
|
||||
tcp_close( sbiod->sbiod_sb->sb_fd );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue