Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c47223f0 authored by Pawin Vongmasa's avatar Pawin Vongmasa
Browse files

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
parent 9055674c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment