Fix unload of recursively linked library

Expanded test for recursive libs. Fixed bug with unnecessary
  soinfo_free of already loaded library.

Change-Id: I2cc19f2650c8b12a35feeac127ef608ebba44d88
This commit is contained in:
Dmitriy Ivanov
2014-09-09 10:21:42 -07:00
parent 8d8a789c49
commit a6ac54a215
4 changed files with 42 additions and 7 deletions

View File

@@ -843,6 +843,7 @@ static soinfo* load_library(LoadTaskList& load_tasks, const char* name, int dlfl
}
if ((dlflags & RTLD_NOLOAD) != 0) {
DL_ERR("library \"%s\" wasn't loaded and RTLD_NOLOAD prevented it", name);
return nullptr;
}
@@ -950,7 +951,6 @@ static bool find_libraries(const char* const library_names[], size_t library_nam
soinfo* needed_by = task->get_needed_by();
if (is_recursive(si, needed_by)) {
soinfo_free(si);
return false;
}