diff options
| author | 2024-06-07 00:51:38 +0000 | |
|---|---|---|
| committer | 2024-06-07 00:51:38 +0000 | |
| commit | 7b09c7f348fa6ad1074e28b23f4934e4b7bb1b3e (patch) | |
| tree | b78769269ff2ab28634c1ea9f6f91595f666087a | |
| parent | 17a071f29218042070150e5847b43054941b1585 (diff) | |
| parent | b6c0fa01335a176bf1cce986cfaadfc1b3667d53 (diff) | |
Merge "Fix pipe fds leak in copyInternalSpliceSocket" into main am: b6c0fa0133
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3111727
Change-Id: I7ccd71acf52b6e47b7cf1cd1aca4c51d20fca6c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | core/java/android/os/FileUtils.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/os/FileUtils.java b/core/java/android/os/FileUtils.java index 61b52c67dfe2..e6b1c07846f9 100644 --- a/core/java/android/os/FileUtils.java +++ b/core/java/android/os/FileUtils.java @@ -580,6 +580,8 @@ public final class FileUtils { ", copied:" + progress + ", read:" + (count - countToRead) + ", in pipe: " + countInPipe); + Os.close(pipes[0]); + Os.close(pipes[1]); throw new ErrnoException("splice, pipe --> fdOut", EIO); } else { progress += t; @@ -607,6 +609,8 @@ public final class FileUtils { listener.onProgress(progressSnapshot); }); } + Os.close(pipes[0]); + Os.close(pipes[1]); return progress; } |