libgui: assign handle to NULL after free

to avoid use-after-free situations

Change-Id: If9c09f509bc55795856302e5ca34470df019c622
This commit is contained in:
Praveen Chavan 2015-09-16 11:20:00 -07:00 committed by Steve Kondik
parent d15d2252b0
commit c784dfc39f

View File

@ -112,6 +112,7 @@ void GraphicBuffer::free_handle()
GraphicBufferAllocator& allocator(GraphicBufferAllocator::get()); GraphicBufferAllocator& allocator(GraphicBufferAllocator::get());
allocator.free(handle); allocator.free(handle);
} }
handle = NULL;
mWrappedBuffer = 0; mWrappedBuffer = 0;
} }