Commit 01e6bc18 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Sync with HEAD

parent 58549325
...@@ -629,10 +629,11 @@ idl_insert_key( ...@@ -629,10 +629,11 @@ idl_insert_key(
#else #else
if ( !first && (unsigned long)(i + 1) < ID_BLOCK_NIDS(idl) ) { if ( !first && (unsigned long)(i + 1) < ID_BLOCK_NIDS(idl) ) {
#endif #endif
Datum k3;
/* read it in */ /* read it in */
cont_alloc( &k2, &key ); cont_alloc( &k3, &key );
cont_id( &k2, ID_BLOCK_ID(idl, i + 1) ); cont_id( &k3, ID_BLOCK_ID(idl, i + 1) );
if ( (tmp2 = idl_fetch_one( be, db, k2 )) == NULL ) { if ( (tmp2 = idl_fetch_one( be, db, k3 )) == NULL ) {
#ifdef NEW_LOGGING #ifdef NEW_LOGGING
LDAP_LOG( INDEX, ERR, LDAP_LOG( INDEX, ERR,
"idl_insert_key: idl_fetch_one returned NULL\n", 0, 0, 0); "idl_insert_key: idl_fetch_one returned NULL\n", 0, 0, 0);
...@@ -643,7 +644,7 @@ idl_insert_key( ...@@ -643,7 +644,7 @@ idl_insert_key(
#endif #endif
/* split the original block */ /* split the original block */
cont_free( &k2 ); cont_free( &k3 );
goto split; goto split;
} }
...@@ -683,7 +684,7 @@ idl_insert_key( ...@@ -683,7 +684,7 @@ idl_insert_key(
db->dbc_maxids )) ) { db->dbc_maxids )) ) {
case 1: /* id inserted first in block */ case 1: /* id inserted first in block */
rc = idl_change_first( be, db, key, idl, rc = idl_change_first( be, db, key, idl,
i + 1, k2, tmp2 ); i + 1, k3, tmp2 );
/* FALL */ /* FALL */
case 2: /* id already there - how? */ case 2: /* id already there - how? */
...@@ -707,6 +708,8 @@ idl_insert_key( ...@@ -707,6 +708,8 @@ idl_insert_key(
idl_free( tmp ); idl_free( tmp );
idl_free( tmp2 ); idl_free( tmp2 );
cont_free( &k3 );
cont_free( &k2 );
idl_free( idl ); idl_free( idl );
return( 0 ); return( 0 );
...@@ -715,6 +718,7 @@ idl_insert_key( ...@@ -715,6 +718,7 @@ idl_insert_key(
} }
idl_free( tmp2 ); idl_free( tmp2 );
cont_free( &k3 );
} }
split: split:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment