linker: cleanup solist after unsuccessful read

Bug: http://b/25560017
Change-Id: I03c5a1d7aed34c480d341aacfb3b1afdfa037b99
This commit is contained in:
Dmitriy Ivanov
2015-11-06 10:44:37 -08:00
parent 004fead6bc
commit fd7a91e692
2 changed files with 7 additions and 0 deletions

View File

@@ -1523,6 +1523,8 @@ static bool load_library(LoadTask* task,
// Read the ELF header and some of the segments.
if (!task->read(realpath.c_str(), file_stat.st_size)) {
soinfo_free(si);
task->set_soinfo(nullptr);
return false;
}