summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus.fritzsch@xse.de>2014-08-20 16:40:28 +0200
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-09-01 15:55:43 +0900
commitf036639357d1a36489c28f9831e58423262988fb (patch)
treeb5be525c9f763852f8516611b407fad694333582
parent5fc6f224202ba9d0deb710ff8fc0a5d969fe4716 (diff)
downloadwayland-ivi-extension-f036639357d1a36489c28f9831e58423262988fb.tar.gz
ilmControl: destroy output objects, even w/o controller
Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
-rw-r--r--ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
index a1968f5..3aae4c5 100644
--- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
+++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
@@ -951,6 +951,21 @@ static void destroy_control_resources(void)
{
struct ilm_control_context *ctx = &ilm_context;
+ // free resources of output objects
+ if (! ctx->wl.controller) {
+ struct screen_context *ctx_scrn;
+ struct screen_context *next;
+
+ wl_list_for_each_safe(ctx_scrn, next, &ctx->wl.list_screen, link) {
+ if (ctx_scrn->output != NULL) {
+ wl_output_destroy(ctx_scrn->output);
+ }
+
+ wl_list_remove(&ctx_scrn->link);
+ free(ctx_scrn);
+ }
+ }
+
if (ctx->wl.controller != NULL) {
{
struct surface_context *l;