mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
More fixes for prev commit
This commit is contained in:
parent
3081f2df88
commit
c7313c09b4
@ -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; i<nbackends; i++, be++ ) {
|
||||
be->be_pcl_mutexp = &be->be_pcl_mutex;
|
||||
}
|
||||
}
|
||||
|
||||
be = &backends[nbackends++];
|
||||
|
||||
be->bd_info = bi;
|
||||
|
Loading…
Reference in New Issue
Block a user