555472a186db381def14d2f27c8175d93418ff61
Currently, the dump methods open BpfMap objects and never close them. This leaks filedescriptors, and if dump is called often enough, will crash the networkstack process. Fix this by using try-with-resources statements that automatically close the map when exiting the try block. Change the signature of BpfMap#close from "throws Exception" to "throws ErrnoException" since it does not throw any other type of checked exceptions. Test: "lsof | grep network_st" while running "dumpsys tethering bpf" in a loop Change-Id: I66c407454c2715bf41bf3a2e81bd582f9ea5a905
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%