server: add wl_input_device_release()
authorPekka Paalanen <ppaalanen@gmail.com>
Tue, 3 Jan 2012 14:32:40 +0000 (16:32 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 3 Jan 2012 16:22:58 +0000 (11:22 -0500)
commit2755847fce68d6ad36e180f807d06e8a6e70bce7
treea8d3c5c0a64ee32e39842b485805adc6981cb75c
parentd6465c5b402362c730c703f3f6dd5deddefec113
server: add wl_input_device_release()

Add a clean-up function for destroying all objects created in
wl_input_device_init(). Can be used to fix memory leaks reported by
Valgrind in the demos.

The init function was also missing an explicit initialisation of the
'keys' array. Add the explicit array init, although it is redundant with
the zeroing of the whole struct.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
krh: Edited to rename function to *_release()
src/wayland-server.c
src/wayland-server.h