OSDN Git Service
(root)
/
android-x86
/
frameworks-native.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4052245
)
surfaceflinger: fix a release fence leak
author
Chia-I Wu
<olv@google.com>
Wed, 17 May 2017 20:43:16 +0000
(13:43 -0700)
committer
Chia-I Wu
<olv@google.com>
Wed, 17 May 2017 21:21:04 +0000
(14:21 -0700)
We leak release fence fds when we believe hwcomposer2 gives us any
invalid layer and return early.
Bug:
38151478
Test: boots
Change-Id: I299721eca8bc7927052170fe87ee51e9b91006aa
services/surfaceflinger/DisplayHardware/HWC2.cpp
patch
|
blob
|
history
diff --git
a/services/surfaceflinger/DisplayHardware/HWC2.cpp
b/services/surfaceflinger/DisplayHardware/HWC2.cpp
index
8270c39
..
15b72c4
100644
(file)
--- a/
services/surfaceflinger/DisplayHardware/HWC2.cpp
+++ b/
services/surfaceflinger/DisplayHardware/HWC2.cpp
@@
-917,6
+917,9
@@
Error Display::getReleaseFences(
} else {
ALOGE("getReleaseFences: invalid layer %" PRIu64
" found on display %" PRIu64, layerIds[element], mId);
+ for (; element < numElements; ++element) {
+ close(fenceFds[element]);
+ }
return Error::BadLayer;
}
}