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

Skip to content
Commit 1fa4142e authored by Avichal Rakesh's avatar Avichal Rakesh
Browse files

ExternalCameraHAL: Fix memory leak when copying buffer fence

Pointer to native_handle_t created using native_handle_create should
be cleaned up using native_handle_delete even if the fds in the
native_handle is no longer managed by it. ExternalCameraDeviceSession
creates native_handle_t as an intermediate to convert to AIDL
NativeHandle but doesn't call native_handle_delete on the
intermediate object which led to memory leaks.

This CL removes the intermediate object and copies the fence fd
directly.

Bug: 305638723
Test: No functional change. Compilation successful.
Change-Id: Ie3c558ee1ae6d2e84053b65eed7db179118395bb
parent 25335354
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment