ecore_wl2_tbmsurface: Fix use after free 76/288276/5
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 14 Feb 2023 09:53:22 +0000 (18:53 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 14 Feb 2023 10:42:52 +0000 (19:42 +0900)
commit9bafb01b0447ec732b2136a64ead69f62456530d
tree8deb8a5428ba02d33fe5b3471ff38978400401be
parentf80a467b477ee08ab628087821cbb303d093c3d7
ecore_wl2_tbmsurface: Fix use after free

This patch fixes the following problem
+-----------------------------------------------------------------------+
|ERROR: AddressSanitizer: heap-use-after-free on address 0x007fa46ce840 |
|       at pc 0x007faaee4c68 bp 0x007fd4c23230 sp 0x007fd4c23248        |
|READ of size 4 at 0x007fa46ce840 thread T0                             |
|#0 0x7faaee4c64 in _tbm_surface_queue_is_valid                         |
|#1 0x7faaeee8a0 in tbm_surface_queue_release                           |
|#2 0x7faded480c in buffer_release                                      |
|#3 0x7faa4d3fd4 in ffi_call_SYSV                                       |
|#4 0x7faa4d2ba0 in ffi_call_int                                        |
|#5 0x7fad00f720 in wl_closure_invoke                                   |
|#6 0x7fad002a58 in dispatch_event                                      |
|                                                                       |
|freed by thread T0 here:                                               |
|#1 0x7faaef1284 in tbm_surface_queue_destroy                           |
|#2 0x7faded5a68 in _evas_tbmbuf_surface_destroy                        |
|||#3 0x7faded3648 in ecore_wl2_surface_destroy                         |
|#4 0x7fa3d395c0 in _evas_outbuf_free                                   |
|#5 0x7fa3d37d90 in evas_render_engine_software_generic_clean           |
|#6 0x7fa3d37d90 in eng_output_free                                     |
+-----------------------------------------------------------------------+

Change-Id: I1feda9e7d8fa0832dc0a0fe83af637d897a3ef8c
src/lib/ecore_wl2/ecore_wl2_private.h
src/lib/ecore_wl2/ecore_wl2_tbmsurface.c