More fixes for prev commit

This commit is contained in:
Howard Chu 2004-08-18 15:23:37 +00:00
parent 3081f2df88
commit c7313c09b4

View File

@ -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;