summaryrefslogtreecommitdiff
path: root/libs/gui/ConsumerBase.cpp
diff options
context:
space:
mode:
author Pawin Vongmasa <pawin@google.com> 2019-04-03 17:31:37 -0700
committer Pawin Vongmasa <pawin@google.com> 2019-04-04 21:29:42 +0000
commitc47223f05434b4b3bb7298b3d5a790b8a8633b24 (patch)
tree4cbbe4457bcfca66bd8fa1ade11d45319028c7d2 /libs/gui/ConsumerBase.cpp
parent9055674c6c3cdf32207ccce77d27f4ea55c343f8 (diff)
Fix GraphicBuffer leak in bufferqueue@2.0
Converting AHardwareBuffer to GraphicBuffer* will automatically increase an underlying reference count. The copy assignment operator of sp<GraphicBuffer> will increase a reference count another time, causing memory leak. Calling AHardwareBuffer_release() will remove the extra reference count and fix the leak. Test: Enable Codec2, then run cts-tradefed run cts-dev -m \ CtsMediaTestCases --compatibility:module-arg \ CtsMediaTestCases:include-annotation:\ android.platform.test.annotations.RequiresDevice Bug: 126205083 Change-Id: Ib67d1714c50d650ff88cf8487a0c306a08a793d3
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
0 files changed, 0 insertions, 0 deletions