]> git.sur5r.net Git - openldap/commitdiff
Wrap csn filter frees with sync mode check.
authorKurt Zeilenga <kurt@openldap.org>
Sun, 15 Sep 2002 22:42:50 +0000 (22:42 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 15 Sep 2002 22:42:50 +0000 (22:42 +0000)
servers/slapd/back-bdb/search.c

index 6e7548b857193271c0613c0bed317a73f0cc42a1..91db53389511d0ef8d41e0d732492876d2bae137 100644 (file)
@@ -794,6 +794,7 @@ loop_continue:
 
                ldap_pvt_thread_yield();
        }
+
 #ifdef LDAP_CLIENT_UPDATE
        if ( op->o_clientupdate_type & SLAP_LCUP_SYNC ) {
                int ret;
@@ -866,12 +867,14 @@ done:
        }
 
 #ifdef LDAP_CLIENT_UDATE
-       if ( csnfeq.f_ava != NULL && csnfeq.f_av_value.bv_val != NULL ) {
-               ch_free( csnfeq.f_av_value.bv_val );
-       }
+       if ( op->o_clientupdate_type & SLAP_LCUP_SYNC ) {
+               if ( csnfeq.f_ava != NULL && csnfeq.f_av_value.bv_val != NULL ) {
+                       ch_free( csnfeq.f_av_value.bv_val );
+               }
        
-       if ( csnfge.f_ava != NULL && csnfge.f_av_value.bv_val != NULL ) {
-               ch_free( csnfge.f_av_value.bv_val );
+               if ( csnfge.f_ava != NULL && csnfge.f_av_value.bv_val != NULL ) {
+                       ch_free( csnfge.f_av_value.bv_val );
+               }
        }
 #endif /* LDAP_CLIENT_UPDATE */