mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Really fix ITS#2905
This commit is contained in:
parent
778516cc8c
commit
a8dbfd322a
@ -265,9 +265,8 @@ static int bdb_tool_next_id(
|
|||||||
} else if ( !hole ) {
|
} else if ( !hole ) {
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
if ( e->e_id == NOID ) {
|
e->e_id = ei->bei_id;
|
||||||
return DB_KEYEXIST;
|
rc = DB_KEYEXIST;
|
||||||
}
|
|
||||||
|
|
||||||
for ( i=0; i<nholes; i++) {
|
for ( i=0; i<nholes; i++) {
|
||||||
if ( holes[i].id == e->e_id ) {
|
if ( holes[i].id == e->e_id ) {
|
||||||
@ -276,6 +275,7 @@ static int bdb_tool_next_id(
|
|||||||
for (j=i;j<nholes;j++) holes[j] = holes[j+1];
|
for (j=i;j<nholes;j++) holes[j] = holes[j+1];
|
||||||
holes[j].id = 0;
|
holes[j].id = 0;
|
||||||
nholes--;
|
nholes--;
|
||||||
|
rc = 0;
|
||||||
break;
|
break;
|
||||||
} else if ( holes[i].id > e->e_id ) {
|
} else if ( holes[i].id > e->e_id ) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user