weston/frontend
Marius Vlad 582ae5385b xwayland: Fix some memory leaks on compositor shutdown path
While exiting, on the shutdown compositor path, for instance if we don't have
permission access to create a lock file we will end up reporting some memory
leaks/use-after-free.

This patch addresses of all them:

- api->listen returns NULL and we do not property free wet_xwayland
  struct
- we don't remove the signal handler causing a use-after-free (signal
  handler gets called by the main object has been freed)
- we don't remove/destroy the debug scope causing a mem-leak
- on the same path check for valid event source to avoid deref invalid
  pointers.

Add a simple wrapper which we can call in other call sites.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-12-15 11:35:04 +02:00
..
config-helpers.c frontend: use weston_enum_map for renderers 2025-08-05 11:51:23 -05:00
executable.c Rename compositor/ to frontend/ 2023-12-18 15:34:26 +00:00
main.c frontend: don't require XDG_RUNTIME_DIR 2025-12-09 11:46:01 +02:00
meson.build frontend: create automatic color profiles from .ini 2025-10-07 17:23:35 +03:00
screen-share.c screen-share: Guard pixman_image_unref call on shared_output_destroy 2025-08-28 11:17:33 +02:00
systemd-notify.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
text-backend.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
weston-private.h tests: add color-output-parsing 2025-10-09 16:17:57 +00:00
weston-screenshooter.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
weston.desktop Rename compositor/ to frontend/ 2023-12-18 15:34:26 +00:00
weston.h Rename compositor/ to frontend/ 2023-12-18 15:34:26 +00:00
xwayland.c xwayland: Fix some memory leaks on compositor shutdown path 2025-12-15 11:35:04 +02:00