From: Howard Chu Date: Fri, 1 May 2009 04:36:39 +0000 (+0000) Subject: ITS#6074 freeing already-freed EntryInfos... X-Git-Tag: ACLCHECK_0~581 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6e27fa50767413feb0fd67a6846c507bad8af4a6;p=openldap ITS#6074 freeing already-freed EntryInfos... --- diff --git a/servers/slapd/back-bdb/cache.c b/servers/slapd/back-bdb/cache.c index e54408d659..02f5554e22 100644 --- a/servers/slapd/back-bdb/cache.c +++ b/servers/slapd/back-bdb/cache.c @@ -1345,6 +1345,9 @@ bdb_cache_delete_cleanup( { /* Enter with ei locked */ + /* already freed? */ + if ( !ei->bei_parent ) return; + if ( ei->bei_e ) { ei->bei_e->e_private = NULL; #ifdef SLAP_ZONE_ALLOC @@ -1368,6 +1371,10 @@ bdb_cache_delete_internal( int rc = 0; /* return code */ int decr_leaf = 0; + /* already freed? */ + if ( !e->bei_parent ) + return -1; + /* Lock the parent's kids tree */ bdb_cache_entryinfo_lock( e->bei_parent );