compositor: Don't free an uninitialised pointer.
authorOndřej Majerech <majerech.o@gmail.com>
Thu, 11 Sep 2014 13:53:15 +0000 (15:53 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 12 Sep 2014 06:38:39 +0000 (09:38 +0300)
commit03db71caea98f8a2c5d302763289495ea2b30596
tree813dcc7316eaa656b2737eaab62587390595307d
parent5e3b693a117e227e21df1826fcfe4baf2e01c08a
compositor: Don't free an uninitialised pointer.

When backend_init returns NULL, we goto out_signals, which wants to
free(modules), but in this particular code path, modules hasn't been
initialised leading to a "Double-free or corruption" error message.
Initialising modules to NULL makes the free a no-op in this scenario.

Signed-off-by: Ondřej Majerech <majerech.o@gmail.com>
Reviewed-by: Ryo Munakata <ryomnktml@gmail.com>
src/compositor.c