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>
This commit is contained in:
Pekka Paalanen 2019-11-06 12:07:23 +02:00 committed by Daniel Stone
parent f38d4458f7
commit e5e8188aa5

View File

@ -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;