xdg_shell: Destroy ds_xdg_surfaces when cleaning up client 58/278058/1
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 20 Apr 2022 06:45:55 +0000 (15:45 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 18 Jul 2022 05:08:17 +0000 (14:08 +0900)
commit9cbe14ff64360116b7b367930e3cd66f66bbd319
tree8ffdebd060c72dbd134a68d6342f00af6720e032
parent464a27127ea22e7cf95e1546204ad57c9a5cc6d8
xdg_shell: Destroy ds_xdg_surfaces when cleaning up client

This patch fixes memory corruption caused by removing
ds_xdg_surfaces's link in destroy_xdg_surface().

When wl_client is destroyed, ds_xdg_shell_client can be destroyed
before its own ds_xdg_surfaces. This led to memory corruption because of
illegal access to a freed memory when trying to remove list of
ds_xdg_surface.link.

Change-Id: I2558e445af25e85a84f761f845dae22eb10eeab4
src/libds/xdg_shell/xdg_shell.c
src/libds/xdg_shell/xdg_shell.h