summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-07-13 14:16:54 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-07-13 14:16:54 +0000
commit35c25d3665f59b4773b45d43e26975a5312d70f1 (patch)
tree94a1d422ff04348450d90aec100fbbe9fa172fd7
parentf02ed4e5227ff6f6fbb276328c6faa4a0ea56e25 (diff)
parentb8b8e2150337ec1655017cdeda25e0ec9223e1f9 (diff)
Merge "Fix memory leak of FileDescriptorInfo object." into main
-rw-r--r--core/jni/fd_utils.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/jni/fd_utils.cpp b/core/jni/fd_utils.cpp
index 40f6e4f63cd7..5c71f692b80f 100644
--- a/core/jni/fd_utils.cpp
+++ b/core/jni/fd_utils.cpp
@@ -580,6 +580,7 @@ void FileDescriptorTable::RestatInternal(std::set<int>& open_fds, fail_fn_t fail
// TODO(narayan): This will be an error in a future android release.
// error = true;
// ALOGW("Zygote closed file descriptor %d.", it->first);
+ delete it->second;
it = open_fd_map_.erase(it);
} else {
// The entry from the file descriptor table is still open. Restat