From 0afba16b9bc55c6838bafa0251622d243e5a6698 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 22 Apr 2003 13:14:06 +0000 Subject: [PATCH] Fix id2entry, let bdb_cache_release_all clean up EntryInfos Fix idl_cache_put --- servers/slapd/back-bdb/id2entry.c | 10 ++-------- servers/slapd/back-bdb/idl.c | 2 ++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/servers/slapd/back-bdb/id2entry.c b/servers/slapd/back-bdb/id2entry.c index e4bc3df9bc..864d90b044 100644 --- a/servers/slapd/back-bdb/id2entry.c +++ b/servers/slapd/back-bdb/id2entry.c @@ -26,7 +26,7 @@ int bdb_id2entry_put( #ifdef BDB_HIER struct berval odn, ondn; - /* We only store rdns, and they go in the id2parent database. */ + /* We only store rdns, and they go in the dn2id database. */ odn = e->e_name; ondn = e->e_nname; @@ -117,12 +117,6 @@ int bdb_id2entry( ch_free( data.data ); } - if ( rc == 0 ) { -#ifdef BDB_HIER - bdb_fix_dn(be, id, *e); -#endif - } - return rc; } @@ -216,7 +210,7 @@ int bdb_entry_release( } } else { if (e->e_private != NULL) - free (e->e_private); + BEI(e)->bei_e = NULL; e->e_private = NULL; bdb_entry_return ( e ); } diff --git a/servers/slapd/back-bdb/idl.c b/servers/slapd/back-bdb/idl.c index 42bd02dbe2..52d24ac69d 100644 --- a/servers/slapd/back-bdb/idl.c +++ b/servers/slapd/back-bdb/idl.c @@ -344,6 +344,8 @@ bdb_idl_cache_put( bdb_idl_cache_entry_t idl_tmp; bdb_idl_cache_entry_t *ee; + DBT2bv( key, &idl_tmp.kstr ); + ee = (bdb_idl_cache_entry_t *) ch_malloc( sizeof( bdb_idl_cache_entry_t ) ); ee->db = db; -- 2.39.5