commit | 4882eaba25a4a51d49c3e2122dec6bbc0640a1d7 | [log] [tgz] |
---|---|---|
author | Jin Qian <jinqian@google.com> | Mon Apr 03 18:05:01 2017 -0700 |
committer | Jin Qian <jinqian@google.com> | Mon Apr 03 23:13:26 2017 -0700 |
tree | 93f6e4d9f3f3954ee50956a96bff3c498a1583ab | |
parent | 71de1368c07b4c86a40d13c601c4b744ab9a7083 [diff] |
storaged: use sp<> to keep refcount for storaged_t object BatteryListener takes sp<> as parameter. Passing raw storaged_t ptr to BatteryListener will cause the ptr to be freed when BatteryListener releases the sp<>. Keep a refcount in storaged to prevent this from happening. Test: kill healthd while storaged is running Bug: 36652060 Change-Id: I96bc45a3bedb39eb7158b8f6c86334b5b31c9346