[Date Prev][Date Next] [Chronological] [Thread] [Top]

crasher in back-bdb/search.c



Fix attached.

Index: search.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-bdb/search.c,v
retrieving revision 1.78
diff -u -r1.78 search.c
--- search.c    13 Sep 2002 22:29:07 -0000      1.78
+++ search.c    15 Sep 2002 18:23:42 -0000
@@ -851,13 +851,15 @@
                bdb_cache_return_entry_r ( bdb->bi_dbenv, &bdb->bi_cache, e, &lock );
        }
 
-       if ( csnfeq.f_av_value.bv_val != NULL ) {
+#ifdef LDAP_CLIENT_UPDATE
+       if ( csnfeq.f_ava != NULL && csnfeq.f_av_value.bv_val != NULL ) {
                ch_free( csnfeq.f_av_value.bv_val );
        }
 
-       if ( csnfge.f_av_value.bv_val != NULL ) {
+       if ( csnfge.f_ava != NULL && csnfge.f_av_value.bv_val != NULL ) {
                ch_free( csnfge.f_av_value.bv_val );
        }
+#endif /* LDAP_CLIENT_UPDATE */
 
        LOCK_ID_FREE (bdb->bi_dbenv, locker );
--
Luke Howard | lukehoward.com
PADL Software | www.padl.com