Skip to content

Commit 919ba00

Browse files
Treehugger RobotGerrit Code Review
authored andcommitted
Merge "fix potential leakage issues" into main
2 parents 9639da0 + 23349ea commit 919ba00

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

libs/ui/GraphicBuffer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,8 @@ status_t GraphicBuffer::unflatten(void const*& buffer, size_t& size, int const*&
596596
width = height = stride = format = usage_deprecated = 0;
597597
layerCount = 0;
598598
usage = 0;
599+
native_handle_close(handle);
600+
native_handle_delete(const_cast<native_handle_t*>(handle));
599601
handle = nullptr;
600602
ALOGE("unflatten: registerBuffer failed: %s (%d)", strerror(-err), err);
601603
return err;

0 commit comments

Comments
 (0)