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
Loading
Please register or sign in to comment