From: Howard Chu Date: Wed, 12 Mar 2003 10:45:00 +0000 (+0000) Subject: ITS#2348, additional check to prevent re-inserting IDs that are X-Git-Tag: NO_SLAP_OP_BLOCKS~139 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=97a805415d6a2db6c2cba039632135ff6e06e85b;p=openldap ITS#2348, additional check to prevent re-inserting IDs that are already present. Hopefully the final fix... --- diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index 79f55a6ffb..fcfeebcf18 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -560,6 +560,11 @@ idl_insert_key( if (ID_BLOCK_ID(idl, i) < id) i++; #endif + /* The ID already exists in the IDL, no insert needed */ + if (ID_BLOCK_ID(idl, i) == id) { + idl_free( idl ); + return 0; + } if ( i != 0 ) { i--;