From f2800036fa297a17af9cd4710d5edb92c19d265a Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 5 Mar 2003 23:10:32 +0000 Subject: [PATCH] ITS#2348: cont_alloc/cont_free cleanup in idl_insert_key --- servers/slapd/back-ldbm/idl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index d879f568a6..f5cf6fee58 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -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 ); -- 2.39.5