weston/ivi-shell
Michael Tretter c56e69bc85 ivi-shell: fix free in get_layers_under_surface
If a controller requests the layers under a surface that has no views attached,
Weston crashes since it tries to free the array that would be used to return the
found layers, but has not been allocated before.

Free the ppArray only if it was allocated in ivi_layout_get_layers_under_surface
before and no layers were found.

While at it, make it obvious that checking the length is an integer comparison
by comparing it to 0.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
2022-10-19 14:16:06 +02:00
..
hmi-controller.c hmi-controller: don't add surface to layer in mode_random_replace() 2022-09-29 11:08:55 +09:00
ivi-layout-export.h ivi-shell: remove dysfunctional link 2022-08-08 14:27:41 +00:00
ivi-layout-private.h ivi-shell: activate keyboard focus for xdg-shell surface 2022-09-29 11:08:55 +09:00
ivi-layout-shell.h ivi-shell: emit created notification earlier for desktop surfaces 2022-04-14 13:10:04 +00:00
ivi-layout-transition.c ivi-layout: use libweston-desktop api is to send configure events everywhere 2019-07-01 15:50:08 +00:00
ivi-layout.c ivi-shell: fix free in get_layers_under_surface 2022-10-19 14:16:06 +02:00
ivi-shell.c ivi-shell: activate keyboard focus for xdg-shell surface 2022-09-29 11:08:55 +09:00
ivi-shell.h libweston/desktop: Migrate libweston-desktop/libweston-desktop.h 2022-09-23 13:57:26 +03:00
meson.build Move libweston-desktop into libweston 2022-06-28 10:35:52 +00:00
weston.ini.in ivi-shell: bring back reference weston.ini 2021-06-04 12:40:12 +02:00