]> git.sur5r.net Git - openldap/commitdiff
bdb_entry_return must explicitly check for/free attr nvals.
authorHoward Chu <hyc@openldap.org>
Wed, 26 Feb 2003 10:10:13 +0000 (10:10 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 26 Feb 2003 10:10:13 +0000 (10:10 +0000)
servers/slapd/back-bdb/id2entry.c

index 5e4ef60df488d9d6ac345c49336b95af563828fa..87260b65d818f984c3e343a103f7bc27d2060091 100644 (file)
@@ -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 */