tests: fix test-shell init error path

This was forgetting to remove the compositor destroy listener if init failed,
which would lead to use-after-free on compositor tear-down. Found by
inspection.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 5 years ago committed by Daniel Stone
parent f38d4458f7
commit e5e8188aa5
  1. 1
      tests/weston-test-desktop-shell.c

@ -224,6 +224,7 @@ out_surface:
weston_surface_destroy(dts->background_surface);
out_free:
wl_list_remove(&dts->compositor_destroy_listener.link);
free(dts);
return -1;

Loading…
Cancel
Save