From 3505c326da9217d2e06645cae4893ebcabb295da Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 26 Feb 2003 10:10:13 +0000 Subject: [PATCH] bdb_entry_return must explicitly check for/free attr nvals. --- servers/slapd/back-bdb/id2entry.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/servers/slapd/back-bdb/id2entry.c b/servers/slapd/back-bdb/id2entry.c index 5e4ef60df4..87260b65d8 100644 --- a/servers/slapd/back-bdb/id2entry.c +++ b/servers/slapd/back-bdb/id2entry.c @@ -204,6 +204,18 @@ int bdb_entry_return( if( (void *) e->e_attrs != (void *) (e+1)) { attrs_free( e->e_attrs ); } +#ifdef SLAP_NVALUES + else { + /* nvals are not contiguous with the rest. oh well. */ + Attribute *a; + for (a = e->e_attrs; a; a=a->a_next) { + if (a->a_nvals) { + ber_bvarray_free( a->a_nvals ); + a->a_nvals = NULL; + } + } + } +#endif #ifndef BDB_HIER /* See if the DNs were changed by modrdn */ -- 2.39.5