From 97a805415d6a2db6c2cba039632135ff6e06e85b Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 12 Mar 2003 10:45:00 +0000 Subject: [PATCH] ITS#2348, additional check to prevent re-inserting IDs that are already present. Hopefully the final fix... --- servers/slapd/back-ldbm/idl.c | 5 +++++ 1 file changed, 5 insertions(+) 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--; -- 2.39.5