mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#2348: cont_alloc/cont_free cleanup in idl_insert_key
This commit is contained in:
parent
5db7e20cf1
commit
f2800036fa
@ -630,7 +630,6 @@ idl_insert_key(
|
||||
if ( !first && (unsigned long)(i + 1) < ID_BLOCK_NIDS(idl) ) {
|
||||
#endif
|
||||
/* read it in */
|
||||
cont_alloc( &k2, &key );
|
||||
cont_id( &k2, ID_BLOCK_ID(idl, i + 1) );
|
||||
if ( (tmp2 = idl_fetch_one( be, db, k2 )) == NULL ) {
|
||||
#ifdef NEW_LOGGING
|
||||
@ -643,7 +642,6 @@ idl_insert_key(
|
||||
#endif
|
||||
|
||||
/* split the original block */
|
||||
cont_free( &k2 );
|
||||
goto split;
|
||||
}
|
||||
|
||||
@ -707,6 +705,7 @@ idl_insert_key(
|
||||
|
||||
idl_free( tmp );
|
||||
idl_free( tmp2 );
|
||||
cont_free( &k2 );
|
||||
idl_free( idl );
|
||||
return( 0 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user