Don't try to reuse the linker_file structure after we've freed it when

throwing out the kld's loaded by the loader that didn't successfully link.

Found by:	Coverity Prevent(tm)
CID:		1435
This commit is contained in:
John Baldwin 2006-07-10 19:06:01 +00:00
parent a46a6706c5
commit 6b5b470aea

View File

@ -1409,10 +1409,10 @@ linker_preload(void *arg)
/*
* At this point, we check to see what could not be resolved..
*/
TAILQ_FOREACH(lf, &loaded_files, loaded) {
while ((lf = TAILQ_FIRST(&loaded_files)) != NULL) {
TAILQ_REMOVE(&loaded_files, lf, loaded);
printf("KLD file %s is missing dependencies\n", lf->filename);
linker_file_unload(lf, LINKER_UNLOAD_FORCE);
TAILQ_REMOVE(&loaded_files, lf, loaded);
}
/*