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

Skip to content
Commit e7e6006b authored by Francis Hart's avatar Francis Hart Committed by Steve Kondik
Browse files

Surface: Always consume fence fd in queueBuffer

The API docs for the behaviour of ANativeWindow::queueBuffer state that
it always takes ownership of the fence fd parameter. The
Surface::queueBuffer implementation did not conform to this. If an error
occured within its queueBuffer function, then dependending what the
error was, the fence fd was either left untouched or closed.

This made it impossible for a client of ANativeWindow::queueBuffer to
correctly manage the fence fd if an error occured, resulting it either
an fd leak or a use-after-close scenario.

Change-Id: I3a8169709db3715dbcb3db258ef2056623e653f0
parent ebbdb553
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