summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Yi-Yo Chiang <yochiang@google.com> 2022-03-20 17:08:36 +0800
committer Yi-Yo Chiang <yochiang@google.com> 2022-04-01 15:56:32 +0800
commitbf8d20acb74365ce904ab86aaa3dfddad7fdb0f5 (patch)
tree4320b352ba2a09f6f930618084536794b1d5ab52 /api/api.go
parent9b420e664aa31109775662a6ac776c242cd9d316 (diff)
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
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions