compositor: do clean-up on init failure
authorPekka Paalanen <ppaalanen@gmail.com>
Mon, 30 Jul 2012 13:56:57 +0000 (16:56 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 30 Jul 2012 16:42:31 +0000 (12:42 -0400)
commit3361639b7b44c7c0cb900dc6f5acb626e28b3503
tree774b5b7aa1033f47f1113be8b8f777875b779f88
parent69f9840bed01a72d675447db25c438166f404809
compositor: do clean-up on init failure

Simply exit(1)'ing the program will leave the VT unusable, since
DRM backend's clean-up does not run.

After a backend has been initialised, prefer jumping to clean-up instead
of directly exiting.

This fixes the case where 'weston-launch -- -i 5' would leave the
console unusable.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
src/compositor.c