commit | 470148922b63af7ce2c3739c9ef8e8c946964330 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Sat Feb 26 01:11:31 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Sat Feb 26 01:11:31 2022 +0000 |
tree | 1ac9aa188b181a5527b627a09f09e29eb3abb794 | |
parent | 707356d3af078ff5edc92ab4bd160c80181c772c [diff] | |
parent | 3d191bf51796d7c0e41dbb05b784e477bafd02de [diff] |
Merge "Codec2: fix leaked graphic buffer handles" am: a946fb3a41 am: 1f2608e381 am: 6ca5890b43 am: 3d191bf517 Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1999631 Change-Id: I4c263c0f4a7dc1451b7db7ced626a1bb906618f3
diff --git a/media/codec2/vndk/C2AllocatorGralloc.cpp b/media/codec2/vndk/C2AllocatorGralloc.cpp index b5200a5..d8d6f06 100644 --- a/media/codec2/vndk/C2AllocatorGralloc.cpp +++ b/media/codec2/vndk/C2AllocatorGralloc.cpp
@@ -265,6 +265,7 @@ for (const PlaneLayoutComponent &component : plane.components) { if (!gralloc4::isStandardPlaneLayoutComponentType(component.type)) { + mapper.unlock(handle); return C2_CANNOT_DO; } @@ -287,6 +288,7 @@ channel = C2PlaneInfo::CHANNEL_CR; break; default: + mapper.unlock(handle); return C2_CORRUPTED; }