Skip to content
Commit bf8d20ac authored by Yi-Yo Chiang's avatar Yi-Yo Chiang
Browse files

dynsystem: Fix memory leak

Right now the MemoryFile object isn't closed after use, and dangling
file descriptors are leaked into memory each time a MemoryFile object
is created.

Replace android.os.MemoryFile with android.os.SharedMemory and use
try-with-resources to auto manage the opened file descriptors and mapped
memory regions.

Bug: 225310919
Test: Start a DSU installation and check /proc/$pid/maps
Change-Id: I15d9f658c926ef0a46fb558215bfab40f76ddc9a
parent 9b420e66
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment