diff options
author | Dimitry Ivanov <dimitry@google.com> | 2017-04-19 11:28:16 -0700 |
---|---|---|
committer | JP Sugarbroad <jpsugar@google.com> | 2017-05-19 00:29:32 -0700 |
commit | 8c43445152e3372ea284b65845012fdfe7270f82 (patch) | |
tree | 1c7386dffada672b5744cf4f4a331c0914383a70 | |
parent | e360a1c8a389772718814d291978390e0b662805 (diff) | |
download | bionic-nougat-mr2-security-release.tar.gz |
linker: remove link from external library on unloadandroid-7.1.2_r39android-7.1.2_r38android-7.1.2_r37nougat-mr2-security-release
When unloading library make sure the soinfo_link to parent
from linked external libraries is removed as well.
Bug: 36104177
Bug: http://b/37433850
Test: manual
Change-Id: I601b54144acecac54744805b38313c46045c54cb
(cherry picked from commit ee398f820700de30941fd82e38bd917e1513cbc6)
(cherry picked from commit b37d10cc8017c102530c096537890b7c6215ad2b)
-rw-r--r-- | linker/linker.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index 9dc928eb4..a043b859a 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -2246,6 +2246,9 @@ static void soinfo_unload(soinfo* soinfos[], size_t count) { if (local_unload_list.contains(child)) { continue; } else if (child->is_linked() && child->get_local_group_root() != root) { + child->get_parents().remove_if([&] (const soinfo* parent) { + return parent == si; + }); external_unload_list.push_back(child); } else { unload_list.push_front(child); |