From: Kurt Zeilenga Date: Tue, 9 Oct 2001 20:52:57 +0000 (+0000) Subject: Fix the set_malloc/set_alloc fix. X-Git-Tag: OPENLDAP_REL_ENG_2_0_16~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89ba5add54dcd9465fc7b238130a3b6b9aff7128;p=thirdparty%2Fopenldap.git Fix the set_malloc/set_alloc fix. --- diff --git a/libraries/libldbm/ldbm.c b/libraries/libldbm/ldbm.c index 585f8040c6..03112e37f6 100644 --- a/libraries/libldbm/ldbm.c +++ b/libraries/libldbm/ldbm.c @@ -232,8 +232,6 @@ DB_ENV *ldbm_initialize_env(const char *home, int dbcachesize, int *envdirok) #if DB_VERSION_MINOR >= 3 env->set_alloc( env, ldbm_malloc, NULL, NULL ); -#else - env->set_malloc( env, ldbm_malloc ); #endif env->set_errcall( env, ldbm_db_errcall ); @@ -318,6 +316,10 @@ ldbm_open( DB_ENV *env, char *name, int rw, int mode, int dbcachesize ) return NULL; } +#if DB_VERSION_MINOR < 3 + ret->set_malloc( ret, ldbm_malloc ); +#endif + ret->set_pagesize( ret, DEFAULT_DB_PAGE_SIZE ); /* likely should use ber_mem* routines */