From: Quanah Gibson-Mount Date: Sun, 12 Dec 2010 01:43:47 +0000 (+0000) Subject: ITS#6585 X-Git-Tag: OPENLDAP_REL_ENG_2_4_24~269 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6dc360a1e6ef550dc20a86e59d38a927f49fa7f4;p=openldap ITS#6585 --- diff --git a/CHANGES b/CHANGES index 43a95c5f87..05548265a8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ OpenLDAP 2.4 Change Log OpenLDAP 2.4.24 Engineering + Fixed liblber to not close invalid sockets (ITS#6585) Fixed slapd modify to return actual error (ITS#6581) Fixed slapd-bdb entry cache delete failure (ITS#6577) diff --git a/libraries/liblber/sockbuf.c b/libraries/liblber/sockbuf.c index e1d9e4536a..5bd0a1d164 100644 --- a/libraries/liblber/sockbuf.c +++ b/libraries/liblber/sockbuf.c @@ -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; }