]> git.sur5r.net Git - openldap/commitdiff
fix ITS#4802
authorPierangelo Masarati <ando@openldap.org>
Wed, 17 Jan 2007 22:22:00 +0000 (22:22 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 17 Jan 2007 22:22:00 +0000 (22:22 +0000)
servers/slapd/overlays/refint.c

index 0a6d0937759fb8287cc9443cd6bff92c4fbe0dfd..0a7c1aeb09d2decf3d8ca02dffb20f07ecd55d58 100644 (file)
@@ -320,12 +320,14 @@ refint_close(
                ij = ii->next;
                ch_free(ii);
        }
-
-       ch_free(id->dn.bv_val);
-       ch_free(id->nothing.bv_val);
-       ch_free(id->nnothing.bv_val);
-
-       memset( id, 0, sizeof(*id));
+       id->attrs = NULL;
+
+       ch_free( id->dn.bv_val );
+       BER_BVZERO( &id->dn );
+       ch_free( id->nothing.bv_val );
+       BER_BVZERO( &id->nothing );
+       ch_free( id->nnothing.bv_val );
+       BER_BVZERO( &id->nnothing );
 
        return(0);
 }