xdg_shell: Destroy ds_xdg_surfaces when cleaning up client 72/278172/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:58:29 +0000 (14:58 +0900)
commitb2bd27050f3570a8354a8927193aa56f1ff2c792
tree299d09547d85bf8979d588ef50b5da4570111996
parent3bc198b97377e0770b88f81b3e9b29d7f1ce1ef2
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: I40fa5c1121c86f0674d7df81643e9805594e9dae
src/libds/xdg_shell/xdg_shell.c
src/libds/xdg_shell/xdg_shell.h