main: let load_wayland_backend() clean up on error
authorBenoit Gschwind <gschwind@gnu-log.net>
Tue, 10 May 2016 20:47:57 +0000 (22:47 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 11 May 2016 10:43:52 +0000 (13:43 +0300)
commit5375384545e4640acc342577798d30f632f5fc60
tree76b58544ef7457a109a77137ec12ea02fe595651
parent44e302b77dcc1f0fc0f88ff1f3ab6966b7789e85
main: let load_wayland_backend() clean up on error

weston_wayland_backend_config_release() does not bother reinitializing
the structure, it simply frees what is there. This leads to a structure
containing garbage, which might be a surprise.

Require, that if load_wayland_backend_config() fails, the caller must
call weston_wayland_backend_config_release() regardless.

Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: rewrote commit message]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
src/main.c