1f3e9045ad
Trying to run viewporter-test with ASan leak checking, weston-desktop-shell helper client reports many leaks, because the compositor quits before the client can start. Hence the wl_display_roundtrip() fails. Clean up by calling display_destroy() when wl_display_roundtrip() fails. It's late enough that all kinds of things may have been allocated, so a special local tear-down path is not feasible. To make that work, display_destroy() must handle many things that might be NULL which normally aren't. Also display_create() needs to initialize lists early enough so that cleaning them up works. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>