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:
parent
a46a6706c5
commit
6b5b470aea
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user