From: Howard Chu Date: Wed, 18 Aug 2004 15:23:37 +0000 (+0000) Subject: More fixes for prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~690 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c7313c09b40b488746a7c4a8cedee0c582f7b53f;p=openldap More fixes for prev commit --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 2599fce7a7..768a2e340e 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -626,12 +626,22 @@ backend_db_init( return NULL; } + be = backendDB; + backendDB = (BackendDB *) ch_realloc( (char *) backendDB, (nBackendDB + 1) * sizeof(Backend) ); memset( &backendDB[nbackends], '\0', sizeof(Backend) ); + /* did realloc move our table? if so, fix up dependent pointers */ + if ( be != backendDB ) { + int i; + for ( i=0, be=backendDB; ibe_pcl_mutexp = &be->be_pcl_mutex; + } + } + be = &backends[nbackends++]; be->bd_info = bi;