diff options
author | Ramkumar Radhakrishnan <ramkumar@codeaurora.org> | 2017-12-19 17:14:13 -0800 |
---|---|---|
committer | Ramkumar Radhakrishnan <ramkumar@codeaurora.org> | 2018-01-05 12:10:43 -0800 |
commit | b338690ade9496abed6b353068f04a767d6fdc3d (patch) | |
tree | 54e9b3c175a225733aa2f663ccb5c350cae74b91 /sdm/libs/hwc2/hwc_layers.cpp | |
parent | ca16bf276799867fa1a0d39764a9807f797f7df1 (diff) |
hwc2: Fix acquire fence fd leak in SetLayerBuffer()
Close acquire fence fd of the null buffer with client requested
composition is DEVICE/CURSOR
Change-Id: I40a4a0ddc413af797a04fff39a2f0b5c4c9396af
CRs-Fixed: 2167175
Diffstat (limited to 'sdm/libs/hwc2/hwc_layers.cpp')
-rw-r--r-- | sdm/libs/hwc2/hwc_layers.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sdm/libs/hwc2/hwc_layers.cpp b/sdm/libs/hwc2/hwc_layers.cpp index 51384f93..0bcffc62 100644 --- a/sdm/libs/hwc2/hwc_layers.cpp +++ b/sdm/libs/hwc2/hwc_layers.cpp @@ -195,7 +195,9 @@ HWC2::Error HWCLayer::SetLayerBuffer(buffer_handle_t buffer, int32_t acquire_fen if (!buffer) { if (client_requested_ == HWC2::Composition::Device || client_requested_ == HWC2::Composition::Cursor) { - DLOGE("Invalid buffer handle: %p on layer: %d", buffer, id_); + DLOGE("Invalid buffer handle: %p on layer: %d client requested comp type %d", buffer, id_, + client_requested_); + ::close(acquire_fence); return HWC2::Error::BadParameter; } else { return HWC2::Error::None; |