From c7313c09b40b488746a7c4a8cedee0c582f7b53f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 18 Aug 2004 15:23:37 +0000 Subject: [PATCH] More fixes for prev commit --- servers/slapd/backend.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.39.5