diff options
| author | 2020-06-14 14:46:54 +0800 | |
|---|---|---|
| committer | 2020-06-18 23:51:16 +0900 | |
| commit | 121246d1c804340ccf920774feff7b4885fc1f8b (patch) | |
| tree | fcadad9f19cb6a22402b09236a7dce31b71840fe | |
| parent | 276ae01776a46344c8cfca0da507de7bc6f27980 (diff) | |
Memory leak due to no stop for IpNeighborMonitor.
1. When Wi-Fi enabled, ap0 interface is added and IpNeighborMonitor's
start() is invoked in IpServer's constructor.
2. There's no stop for IpNeighborMonitor when IpServer stop.
3. During overnight test for Wi-Fi, networkstack is too slow to
process request due to memory leak in IpNeighborMonitor and
binder buffer is blocked causing exception.
Solution: Invoke IpNeighborMonitor.stop() in UnavailableState.enter().
Bug: 159097215
Test: automatic, turn on and off Wi-Fi every 6 seconds overnight
Change-Id: I8f60c13706f05306e8f25a15f7861d7ecabbc10e
| -rw-r--r-- | packages/Tethering/src/android/net/ip/IpServer.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/Tethering/src/android/net/ip/IpServer.java b/packages/Tethering/src/android/net/ip/IpServer.java index 1671dda4bd57..2871e7f682c6 100644 --- a/packages/Tethering/src/android/net/ip/IpServer.java +++ b/packages/Tethering/src/android/net/ip/IpServer.java @@ -1321,6 +1321,7 @@ public class IpServer extends StateMachine { class UnavailableState extends State { @Override public void enter() { + mIpNeighborMonitor.stop(); mLastError = TetheringManager.TETHER_ERROR_NO_ERROR; sendInterfaceState(STATE_UNAVAILABLE); } |