]> git.sur5r.net Git - openldap/commitdiff
fix entry DN free
authorPierangelo Masarati <ando@openldap.org>
Sat, 21 May 2005 14:53:05 +0000 (14:53 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 21 May 2005 14:53:05 +0000 (14:53 +0000)
servers/slapd/back-ldap/search.c
servers/slapd/back-meta/search.c

index 2c6d296f5c7c1bbc14720bd4a309b3825a26b84f..3a16c4d8185125c55d23f5a84d140a7bb80a0091 100644 (file)
@@ -275,8 +275,8 @@ fail:;
                                rs->sr_operational_attrs = NULL;
                                rs->sr_flags = 0;
                                abort = send_search_entry( op, rs );
-                               if ( !BER_BVISNULL( &ent.e_name ) && ( ent.e_name.bv_val != bdn.bv_val ) )
-                               {
+                               if ( !BER_BVISNULL( &ent.e_name ) ) {
+                                       assert( ent.e_name.bv_val != bdn.bv_val );
                                        free( ent.e_name.bv_val );
                                        BER_BVZERO( &ent.e_name );
                                }
index 34c23de5118e2746e4acd20669fd0db4eac323d5..fff12ab2159b27ec0bc361cb8424ab72bea74370 100644 (file)
@@ -942,8 +942,10 @@ meta_send_entry(
        rs->sr_entry = NULL;
        rs->sr_attrs = NULL;
        
-       if ( !BER_BVISNULL( &ent.e_name ) && ent.e_name.bv_val != bdn.bv_val ) {
-               free( ent.e_name.bv_val );
+       if ( !BER_BVISNULL( &ent.e_name ) ) {
+               if ( ent.e_name.bv_val != bdn.bv_val ) {
+                       free( ent.e_name.bv_val );
+               }
                BER_BVZERO( &ent.e_name );
        }
        if ( !BER_BVISNULL( &ent.e_nname ) ) {